advent-of-code-cpp-2021/day21/day21Part1.cpp
2021-12-21 13:46:04 -05:00

32 lines
770 B
C++

#include <cmath>
using namespace std;
int main (void)
{
int player1Position = 4; //This is for both test and true input
int player1Score = 0;
int player2Position = 8; //This is 5 for true, 8 for test
int player2Score = 0;
int dieRoll = 0;
int dieRollover = 0;
int turnAdd = 0;
bool player1Add = true;
while (player1Position >= 1000 || player2Position >= 1000)
{
if ((dieRoll % 3) == 0)
{
if (player1Add)
{
player1Position = player1Position + ((turnAdd % 10) + 1);
player1Score += player1Position;
}
else
{
}
}
}
// TODO : Multiply loserScore by (100 * dieRollover) + dieRoll
return 0;
}