Prev | Current Page 825 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

message(???Unable to connect???);
}
private var server : GameApi;
private var ended : Bool;
public function new(server)
{
this.server = server;
}
public function yourTurn(g : Array < Array < Int > > )
{
ended = false;
grid(g);
message(???It??™s your turn.???);
}
(continued)
Chapter 15: Putting It All Together with haXe Remoting
447
public function otherTurn(g : Array < Array < Int > > )
{
ended = false;
grid(g);
message(???Wait for the adversary move.???);
}
public function waitAdversary()
{
message(???Wait for another player.???);
}
public function tie(g : Array < Array < Int > > )
{
ended = true;
grid(g);
message(???It??™s a tie! Click the grid to find another player.???);
}
public function winner(g : Array < Array < Int > > )
{
ended = true;
grid(g);
message(???You win! Click the grid to find a new adversary.???);
}
public function looser(g : Array < Array < Int > > )
{
ended = true;
grid(g);
message(???You Lose! Click the grid to find a new adversary.???);
}
public function invalidMove()
{
message(???Invalid move .


Pages:
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837