mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
Bunny in csharp
This commit is contained in:
25
19_Bunny/csharp/BasicData.cs
Normal file
25
19_Bunny/csharp/BasicData.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bunny
|
||||
{
|
||||
internal class BasicData
|
||||
{
|
||||
private readonly int[] data;
|
||||
|
||||
private int index;
|
||||
|
||||
public BasicData(int[] data)
|
||||
{
|
||||
this.data = data;
|
||||
index = 0;
|
||||
}
|
||||
public int Read()
|
||||
{
|
||||
return data[index++];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user