Initial commit, some logic added

This commit is contained in:
2026-05-23 11:50:32 +03:00
commit 96eefbe181
9 changed files with 370 additions and 0 deletions
Executable
+39
View File
@@ -0,0 +1,39 @@
#include <iostream>
#include <vector>
#include <algorithm>
#include "field.h"
using Tile = unsigned long long int;
int main() {
Field field(4);
char action;
while (true) {
field.debug();
std::cin >> action;
switch (action)
{
case 'w':
field.moveUp();
field.spawnTile();
break;
case 's':
field.moveDown();
field.spawnTile();
break;
case 'a':
field.moveLeft();
field.spawnTile();
break;
case 'd':
field.moveRight();
field.spawnTile();
break;
default:
return 0;
}
}
return 0;
}