feat: fully functional CLI and Avalonia UI for Snake game
This commit is contained in:
@@ -1,7 +1,30 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="Snake.Avalonia.Views.GameView">
|
||||
<TextBlock Text="Snake game UI — connect Snake.Core here"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
x:Class="Snake.Avalonia.Views.GameView"
|
||||
Focusable="True">
|
||||
<Grid RowDefinitions="Auto,*,Auto" Margin="12">
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,8">
|
||||
<TextBlock x:Name="ScoreText" FontSize="16" />
|
||||
<TextBlock x:Name="LevelText" FontSize="16" Margin="24,0,0,0" />
|
||||
<TextBlock x:Name="StatusText" FontSize="16" Margin="24,0,0,0" />
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="1"
|
||||
BorderBrush="#666"
|
||||
BorderThickness="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Canvas x:Name="GameCanvas"
|
||||
Background="#1a1a1a"
|
||||
Focusable="True" />
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="2"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,12,0,0">
|
||||
<Button x:Name="StartButton" Content="Start" Width="100" />
|
||||
<Button x:Name="RestartButton" Content="Restart" Width="100" Margin="12,0,0,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user