This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BOARD_CONFIG_H | |
#define BOARD_CONFIG_H | |
class BoardConfig { | |
public: | |
unsigned int rows; | |
unsigned int cols; | |
unsigned int kLength; | |
bool gravityFlag; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gio Borje | |
* 41894135 | |
*/ | |
#include "HashMap.h" | |
using namespace std; | |
/** | |
* Initializes the node with the specified parameters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int AI::IterativeDeepening(const State& state, int alpha, int beta, int depth) { | |
if (cutoff(state, depth)) | |
return eval(state); | |
int result = 0; | |
for (Move* move : moves) { | |
State newState = state.clone(); | |
result = max(result, newState.makeMove(state)); | |
} | |
return result; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def insertNode(root, newNode, data): | |
if root is null: | |
root = newNode | |
root.data = data | |
elif data < root.left: | |
root.left = insertNode(root.left, newNode, data); | |
else: | |
root.right = insertNode(root.right, newNode, data); | |
return root | |
NewerOlder