Skip to content

Commit

Permalink
Add a second player which only discards
Browse files Browse the repository at this point in the history
  • Loading branch information
coel committed Jan 25, 2016
1 parent 4a3b48b commit 5975dc6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions LostMonitors.SimplePlayer/Dummy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Linq;
using LostMonitors.Core;

namespace LostMonitors.SimplePlayer
{
public class Dummy : IPlayer
{
public void Play(BoardState currentState, Turn theirMove, Func<Turn, Card> draw)
{
var yourCards = currentState.YourCards.OrderByDescending(x => x.Value);

var myTurn = new Turn(yourCards.First()) {Discard = true};

draw(myTurn);
}

public string GetFriendlyName()
{
return "Dummy McDumdum";
}
}
}
1 change: 1 addition & 0 deletions LostMonitors.SimplePlayer/LostMonitors.SimplePlayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Dummy.cs" />
<Compile Include="Simpleton.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down

0 comments on commit 5975dc6

Please sign in to comment.