public void ReturnAnIntegerHumanMove() { var board = new[] { _, _, _, _, _, _, _, _, _ }; var player = new TextPlayer(PlayerGlyph.Cross, new StringReader("0"), Console.Out); Assert.AreEqual(0, player.MakeMove(board)); }
private int NoteToVelocity(TextPlayer.Note note) { return (int)(note.Volume * 127); }
private Pitch NoteToPitch(TextPlayer.Note note) { string type = note.Type.ToString().ToUpperInvariant(); type += note.Sharp ? "Sharp" : ""; type += note.Octave; return (Midi.Pitch)Enum.Parse(typeof(Midi.Pitch), type); }
public void PlayNote(int track, TextPlayer.Note note, TimeSpan end) { PlayNote( TrackToChannel(track), NoteToPitch(note), NoteToVelocity(note), end); }