# data[].attributes.body
for (int i = 0; i < 28; i++)
{
TYPE selectedType = TYPE.NONE;
TILETYPE tileType = TILETYPE.VERTICAL;

if ((i >= 0 && i <= 4) || (i >= 15 && i <= 18))
{
tileType = TILETYPE.HORIZONTAL;
}

if (!lastTileIsUpgraded && r.Next(0,28) <= 16 && i != 0)
{

int generatedInt = r.Next(0, 4);
switch (generatedInt)
{
case 0: selectedType = TYPE.MIN_POINTS; break;
case 1: selectedType = TYPE.PLUS_POINTS; break;
case 2: selectedType = TYPE.SET_BACK; break;
case 3: selectedType = TYPE.SET_FRONT; break;
}
lastTileIsUpgraded = true;
}
else
{
lastTileIsUpgraded = false;
}

int playersOnTile = 0;

Tile t = new Tile(PointList[i], playersOnTile, tileType, selectedType);

TileList.Add(t);
}

# data[].attributes.body
private async void ColorLoop()
{

while (true)
{
Transition.run(this, "BackColor", Color.Red, new TransitionType_Linear(7000));
await Task.Delay(7000);

Transition.run(this, "BackColor", Color.Blue, new TransitionType_Linear(7000));
await Task.Delay(7000);

Transition.run(this, "BackColor", Color.Green, new TransitionType_Linear(7000));
await Task.Delay(7000);

}

}

# data[].attributes.body
{
string StudentName = textBox_Naam.Text;
string StudentClass = textBox_Class.Text;
int StudentNr = Convert.ToInt32(textBox_Studentnr.Text);

userData Insert = new userData();
Insert.studentName = StudentName;
Insert.studentClass = StudentClass;
Insert.studentID = StudentNr;

context.userDatas.InsertOnSubmit(Insert);
context.SubmitChanges();
this.userDataTableAdapter.Fill(this.db_GrowToProDataSet.userData);

}

# data[].attributes.body
bool returned = false;

while (!returned)
{
bool isEqual = false;
int generatedInt = r.Next(0, allQuestions.Count + 1);

foreach (Question var in allQuestions)
{
if (var.Id == generatedInt)
{
foreach (Question v in player.questionList)
{
if (v.Id == generatedInt)

isEqual = true;
}

if (!isEqual)
{
return allQuestions[var.Id];
}

}

}

}

return allQuestions[1];

# data[].attributes.body
if (textBox_Player1.Text != "")
{
Player1Num = Convert.ToInt32(textBox_Player1.Text);
players++;
var query = from q in context.userDatas
where Player1Num == q.studentID
select new { q.studentName };
foreach (var t in query)
{
Player1name = t.studentName;
}
p1 = new Player(1, Player1name, "", "");
}
if (textBox_Player2.Text != "")
{
Player2Num = Convert.ToInt32(textBox_Player2.Text);
players++;
var query = from q in context.userDatas
where Player2Num == q.studentID
select new { q.studentName };
foreach (var t in query)
{
Player2name = t.studentName;
}
p2 = new Player(2, Player2name, "", "");
}
if (textBox_Player3.Text != "")
{
Player3Num = Convert.ToInt32(textBox_Player3.Text);
players++;
var query = from q in context.userDatas
where Player3Num == q.studentID
select new { q.studentName };
foreach (var t in query)
{
Player3name = t.studentName;
}
p3 = new Player(3, Player3name, "", "");
}
if (textBox_Player4.Text != "")
{
Player4Num = Convert.ToInt32(textBox_Player4.Text);
players++;
var query = from q in context.userDatas
where Player4Num == q.studentID
select new { q.studentName };
foreach (var t in query)
{
Player4name = t.studentName;
}
p4 = new Player(4, Player4name, "", "");
}

switch (players)
{
case 1:
MessageBox.Show("Er zijn te weining spelers.");
break;

case 2:
gameWindow = new GameWindow(p1, p2, files[comboBox_question_collection.SelectedIndex]);
gameWindow.Show();
break;

case 3:
gameWindow = new GameWindow(p1, p2, p3, files[comboBox_question_collection.SelectedIndex]);
gameWindow.Show();
break;

case 4:
gameWindow = new GameWindow(p1, p2, p3, p4, files[comboBox_question_collection.SelectedIndex]);
gameWindow.Show();
break;
}

# data[].attributes.body
bool finishedLap = false;
for (int i = 1; i <= gedobbeld; i++)
{
TileList[PlayerList[id].vak].playersOnTile--;

if ((PlayerList[id].vak + 1) < 28)
{
PlayerList[id].vak += 1;
}
else
{
PlayerList[id].vak = (PlayerList[id].vak + 1) - 28;
finishedLap = true;
}
TileList[PlayerList[id].vak].playersOnTile++;
DrawPlayers();
await Task.Delay(1000);

}

if (finishedLap)
{
PlayerList[id].spelPunten += 100;
}
TilePowerUp(id);

# data[].attributes.body
https://github.com/aldrikboy/GTP

# data[].attributes.body
Hoe het spel er ongeveer uit gaat zien.
Maak een nieuw blok om grapische veranderingen voor te stellen.

# data[].attributes.body
Vragenlijst selectie, dit is alleen om te testen