public void Pass(IBallPlayer player) { PlayerLogger.LogToConsole($"{Name} passed the ball to {((VolleyBallPlayer)player).Name}"); Random rand = new Random(); if (rand.Next(0, 2) == 1) { ((VolleyBallPlayer)player).Catch(this); } else { ((VolleyBallPlayer)player).Drop(this); } }
public void Drop(IBallPlayer player) { PlayerLogger.LogToConsole($"{Name} dropped the ball passed ny {((VolleyBallPlayer)player).Name}"); }
public void Catch(IBallPlayer player) { PlayerLogger.LogToConsole($"{Name} caught the ball passed by {((VolleyBallPlayer)player).Name}"); }