コード例 #1
0
        public bool playMove(int target, ConnectedPlayer p)
        {
            if (target < 0 || target >= 100)
            {
                return(false);
            }

            Player     currentPlayer = getMatchingBattleshipPlayer(p.color);
            FireResult result        = currentPlayer.fireAtOponent(target);

            master.broadcastRPCMove(result, p);

            return(true);
        }
コード例 #2
0
        public FireResult fireAtOponent(int target)
        {
            FireResult result = oponent.fireAtPlayer(target);

            return(result);
        }