This file contains 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
private void Button_Click(object sender, EventArgs e) | |
{ | |
var button = (Button)sender; | |
int column = Grid.GetColumn(button); | |
int row = Grid.GetRow(button); | |
if (gameActive && fields[column][row] == Player.None) | |
{ | |
var currentSymbol = ""; | |
if (currentPlayer == Player.Player1) | |
{ |
This file contains 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
private int fieldsMarked = 0; |
This file contains 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
private void Button_Click(object sender, EventArgs e) | |
{ | |
var button = (Button)sender; | |
int column = Grid.GetColumn(button); | |
int row = Grid.GetRow(button); | |
if (gameActive && fields[column][row] == Player.None) | |
{ | |
var currentSymbol = ""; | |
if (currentPlayer == Player.Player1) | |
{ |
This file contains 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
private void StartButton_Click(object sender, EventArgs e) | |
{ | |
gameActive = true; | |
for (var x = 0; x < 3; x++) | |
{ | |
for (var y = 0; y < 3; y++) | |
{ | |
fields[x][y] = Player.None; | |
} | |
} |
This file contains 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
<Button Click="StartButton_Click" Name="StartButton" Grid.Row="2" Style="{StaticResource ButtonStyle}">Neues Spiel starten</Button> |
This file contains 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
namespace TicTacToe | |
{ | |
public partial class MainWindow : Window | |
{ | |
private List<List<Player>> fields = new List<List<Player>>() | |
{ | |
new List<Player>() {Player.None, Player.None, Player.None}, | |
new List<Player>() {Player.None, Player.None, Player.None}, | |
new List<Player>() {Player.None, Player.None, Player.None}, |
This file contains 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
<Window x:Class="TicTacToe.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:TicTacToe" | |
mc:Ignorable="d" | |
ResizeMode="NoResize" | |
Title="Tic Tac Toe" Height="600" Width="500"> | |
<Window.Resources> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Gastebuch</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
Hier befindet sich der Inhalt der Seite. | |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Gastebuch</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<h1>Gästebuch</h1> | |
<p>Hier kannst du uns Informationen und Feedback zu deinem Besuch auf dieser Seite hinterlassen. | |
Wir freuen uns darauf, von dir zu hhören!</p> |
This file contains 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
<tr> | |
<td>Name</td> | |
<td> | |
<input type="text" name="gbName" maxlength="20"> | |
</td> | |
</tr> |