Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 661 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 661 Bytes

tttengine

tic tac toe game engine. This work as a js library.

Functions

board.chooseRole(v)

Use this function to define which player do you want to choose. You can choose 'x' or 'o'.

board.move(i)

Use this function to define the next move you want to take. 'i' should between 1~9. Although engine will not allow you cover ocuppied shape, try not to be dummy.

board.getStatus()

Use this function to get the status of the board. It will return an array which be like ["o", "o", "-", "-", "-", "x", "x", "-", "-"].

board.isEnd()

Use this function to check if the game is end.

Thanks

Tic Tac Toe front-end framework by the courtesy of Ricky.