Search found 17 matches

by neptunemermaid
July 13th, 2018, 3:58 pm
Forum: Everything
Topic: Coding Journal/Introduction of Sorts
Replies: 8
Views: 3134

Re: Coding Journal/Introduction of Sorts

Its mostly for me as a backup. Also I'm not sure if there are additional files from Windows Visual Studio or if I can just use these three files and have it work. I'm still learning the IDE and what everything means (such as .sln files).
by neptunemermaid
July 13th, 2018, 4:59 am
Forum: Everything
Topic: Coding Journal/Introduction of Sorts
Replies: 8
Views: 3134

Re: Coding Journal/Introduction of Sorts

Coded TicTacToe. Putting here for reference TicTacToeGame.cpp #include "TicTacToeGame.h" #include <iostream> using namespace std; char board[3][3] = { '0', '1', '2' }; void TicTacToeGame::playGame() { clearBoard(); char board[3][3] = { '0', '1', '2' }; const char player1 = 'X'; const char player2 = ...
by neptunemermaid
July 13th, 2018, 4:57 am
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

It works!
by neptunemermaid
July 13th, 2018, 4:49 am
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

Thank you so much! It's always the little things, isn't it? Now that I can see my board I can hopefully debug it further.
by neptunemermaid
July 11th, 2018, 7:32 pm
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

I declared my board and used breakpoints to step through my program. When I run the program the same problem happens (black box saying "press any key to continue"). When I stepped through and looked at the first isDone = false; line, the debugger said true. Does that mean its reading it as if it sai...
by neptunemermaid
July 11th, 2018, 4:26 am
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

I got the differences, tried to declare my array properly but when i run the program the only thing that happens is a black screen pops up and says "press any key to continue" which is from the pause I put in. Any idea why the game isn't running? Is it still a problem with my 2d array?
by neptunemermaid
July 10th, 2018, 3:14 pm
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

Thanks, man! I have developed some bad habits from formatting, so I'll work on that. Ill also keep in mind the copy/paste code thing for next time. So I'm looking over the code and I'm trying to see what you did differently to fix the problems. It might be too early in the morning but I don't see mu...
by neptunemermaid
July 10th, 2018, 3:55 am
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

main.cpp ------------- #include <iostream> #include "TicTacToeGame.h" using namespace std; int main() { char input; bool isDone = false; TicTacToeGame game; while (isDone = false) { game.playGame(); cout << "Do you want to play again? Y/N"; cin >> input; if (input == 'N' || input == 'n') { isDone = ...
by neptunemermaid
July 10th, 2018, 3:54 am
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

TicTacToeGame.cpp ---------------------- #include "TicTacToeGame.h" #include <iostream> using namespace std; // constructor TicTacToeGame::TicTacToeGame() { } void TicTacToeGame::playGame() { clearBoard(); char player1 = 'X'; char player2 = 'O'; char currentPlayer = player1; bool isDone = false; int...
by neptunemermaid
July 10th, 2018, 3:54 am
Forum: Everything
Topic: TicTacToe Game
Replies: 14
Views: 4243

Re: TicTacToe Game

TicTacToe.h --------------- #pragma once class TicTacToeGame { public: TicTacToeGame(); void playGame(); private: char board; // xy coord from user int getXCoord(); int getYCoord(); // places a marker. If false, couldn't place bool placeMarker(int x, int y, char currentPlayer); // returns true if wi...