Remove sound player, edit readme

This commit is contained in:
foglar 2024-10-09 21:40:22 +02:00
parent ef31b3cb03
commit 781fb1376d
3 changed files with 17 additions and 22 deletions

View File

@ -11,23 +11,6 @@ namespace Tetris
public static void Main(string[] args) public static void Main(string[] args)
{ {
// Music player
#if _WINDOWS
SoundPlayer player = new SoundPlayer("song.wav");
player.PlayLooping();
#endif
//using (var audioFile = new AudioFileReader(audioFile)) using (
//var outputDevice = new WaveOutEvent())
//{
// outputDevice.Init(audioFile);
// outputDevice.Play();
// while (outputDevice.PlaybackState == PlaybackState.Playing)
// {
// Thread.Sleep(1000);
// }
//}
Matrix matrix = new Matrix(); Matrix matrix = new Matrix();
Shape shape = new Shape(matrix); Shape shape = new Shape(matrix);
int previousScore = 0; int previousScore = 0;
@ -58,9 +41,6 @@ namespace Tetris
} }
System.Threading.Thread.Sleep(Speed.ShowSpeed()); System.Threading.Thread.Sleep(Speed.ShowSpeed());
#if _WINDOWS
player.Stop();
#endif
} }
} }

View File

@ -1,5 +1,20 @@
# Tetris # Tetris
[![.NET](https://github.com/foglar/Tetris/actions/workflows/dotnet.yml/badge.svg?branch=master)](https://github.com/foglar/Tetris/actions/workflows/dotnet.yml)
## Compilation and running
```bash
git clone https://github.com/foglar/Tetris.git
cd Tetris
dotnet run ./
```
> [!NOTE]
> For some weird cause it won't run when executed through Visual Studio on Windows.
> Run it in terminal instead with command above.
## Simple tetris game ## Simple tetris game
- [SRS specifications](./TetrominoSRS.md) - [SRS](./TetrominoSRS.md)
- [FS](./TetrominoFS.md) - Not ready yet