

'void displayBoard(char)' cannot convert argument 1 from 'char' to 'char' and if I leave the parenthesis () blank I also get an error saying 'board is not initialized' which it isn't, and I don't want to use a global variable. I have tried several variations of passing the multidimensional array to the function displayBoard but I constantly get errors such as this one: DISPLAYBOARD displayBoard shows the current tic-tac-toe boardĬout << "-" << endl << endl Ĭout << " " << board << " | " << board << " | " << board << endl The boxes are automatically lit in either red or green to indicate which player has claimed them, and lining up three boxes will cause to the lights to blink in a little celebration for the winner.I am trying to create a tic-tac-toe game for a homework project, but I am stuck in not knowing how to pass an array. To “select” a box, you simply wave your hand inside of it. The game itself is just a large electronic version of tic-tac-toe, but with some fun twists. Most of the concepts presented in the video can be grasped by those of you who have the basics of using an Arduino down, but completing this project will also help you expand your understanding of how sensors are monitored and more. This video tutorial comes from YouTuber techiesms and they’ve already done most of the hard work for you. Once you’ve done that, you can move onto slightly more advanced projects like this awesome electronic tic-tac-toe game controlled by an Arduino.

If you’re just getting into the game, you should seek out those projects and replicate them in order to wrap your mind around the basics of electronic design. Edit: Outputs appear weird in the question, the first one is a wonky board since it has inputs, whereas the 2nd example is clean. Even the most skilled makers began their journey with simple projects like blinking LEDs. I was trying to build a tic-tac-toe programme, however, I want to understand how to have a static board when user inputs 'O' or 'X' or when I just want to see the board. The good news is that everyone starts somewhere. Unfortunately, our less experienced readers may see all of that technical wizardry and feel overwhelmed. We tend to feature fairly advanced projects here on Hackster, because those stand out the most.
