User prompt
you are detecting 3 in a row and displaying a win but you are still allowing player moves instead of showing game over and requesting play again
User prompt
you have fixed the game over problem, but now you are not detecting 3 X's or 3 O's in a row column or diagonal
User prompt
there is a fault in the code, you are showing game over after one move
User prompt
when clicked the restart button should completely reset the game to the starting position, initialising all code
Code edit (1 edits merged)
Please save this source code
User prompt
change the colour of the word Restart to white on the restart button the game to reset or restart when clicked
User prompt
add the word "Restart" in black to the restart button
User prompt
add a button to restart the game
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading '0')' in or related to this line: 'self.addChild(self.grid[i][j]);' Line Number: 19
User prompt
display the X and O pieces on the board in the empty spaces when a player clicks the mouse in that position
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'y')' in or related to this line: 'line1.y = 2732 / 3;' Line Number: 27
User prompt
display the background as black, the board a two horizontal white lines and two vertical white lines crossing the horizontal lines at 90 degrees making 9 spaces for our X and O player pieces
User prompt
use the X-player and Y-player images from the assets
User prompt
the board is all white now and I cannot see the X's and O's
User prompt
can you make the board more visible and display the X's and O's in red and blue respectively
Initial prompt
tictactoe101
===================================================================
--- original.js
+++ change.js
@@ -1,7 +1,8 @@
/****
* Classes
****/
+// Red color for X-player
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Class for the Tic Tac Toe board
var Board = Container.expand(function () {
@@ -58,14 +59,15 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x000000 //Init game with black background
+ backgroundColor: 0xFFFFFF //Init game with white background
});
/****
* Game Code
****/
+// Blue color for O-player
// Initialize the board
var board = new Board();
game.addChild(board);
// Create a text object to display the game status
A large letter 'O' as in tic tac toe, coloured blue. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A large letter 'X' as in tic tac toe coloured red, in a similar style to the O-player image. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. No surrounding circle nor square.