-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestTicTacToe.aspx
42 lines (34 loc) · 1.19 KB
/
TestTicTacToe.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestTicTacToe.aspx.cs" Inherits="AlgoritmosCF.TestTicTacToe" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript" src="TicTacToe2.js"></script>
<script type="text/javascript">
var ttt = new TicTacToe()
//alert(ttt.move(1)) // -> [5, "Your move?"]
//alert(ttt.move(2))// -> [3, "Your move?"]
//alert(ttt.move(-10)) // -> [9, "Your move?"]
//set pc empieza y gana
alert(ttt.move()) // -> [5, "Your move?"]
alert(ttt.move(1))// -> [3, "Your move?"]
alert(ttt.move(4)) // -> [9, "Your move?"]
alert(ttt.move(9))
//set valor invalido
alert(ttt.move(1)) // -> [5, "Your move?"]
alert(ttt.move(2))// -> [3, "Your move?"]
alert(ttt.move(0)) // -> [9, "Your move?"]
alert(ttt.move(9))
//alert(ttt.move())
//alert(ttt.move(6)) // -> [4, "Your move?"]
//alert(ttt.move(8)) // -> [0, "Draw!"]
//alert(algo);
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>