fix: game can tie and also refactored element.cpp

This commit is contained in:
DarthMooMancer
2025-09-02 14:27:18 -04:00
parent 9546b47d82
commit b96acc766e
6 changed files with 43 additions and 41 deletions
-16
View File
@@ -1,21 +1,5 @@
#include <iostream>
#include "elements.hpp"
Point::Point() {
m_row = 0;
m_col = 0;
}
void Point::assign(int row, int col) {
m_row = row;
m_col = col;
}
void Point::to_string() {
std::cout << "(" << m_row << ", " << m_col << ")" << std::endl;
}
void Player::check_line(Tile (&tile_list)[9]) {
for(int i = 0; i <= 6; i += 3) {
if(tile_list[i].m_symbol == tile_list[i+1].m_symbol && tile_list[i+1].m_symbol == tile_list[i+2].m_symbol) {