草蜢 - 终端游戏回合功能【难度:0级】:
答案1:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
RollDice();
Move();
Combat();
GetCoins();
BuyHealth();
PrintStatus();
}
}
答案2:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
RollDice();
Move();
Combat();
GetCoins();
BuyHealth();
PrintStatus();
}
}
答案3:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
RollDice();
Move();
Combat();
GetCoins();
BuyHealth();
PrintStatus();
}
}
答案4:
using System;
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Game.Logic.RollDice();
Game.Logic.Move();
Game.Logic.Combat();
Game.Logic.GetCoins();
Game.Logic.BuyHealth();
Game.Logic.PrintStatus();
}
}
答案5:
using System;
using System.Collections.Generic;
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Log = new List<string>
{
"RollDice",
"Move",
"Combat",
"GetCoins",
"BuyHealth",
"PrintStatus",
};
}
}
答案6:
using static Game.Logic;
using System;
using System.Collections.Generic;
public class Kata
{
public static void DoTurn() =>
new List<Action> {RollDice, Move, Combat, GetCoins, BuyHealth, PrintStatus}.ForEach(a => a.Invoke());
}
答案7:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Game.Logic.Log.Add("RollDice");
Game.Logic.Log.Add("Move");
Game.Logic.Log.Add("Combat");
Game.Logic.Log.Add("GetCoins");
Game.Logic.Log.Add("BuyHealth");
Game.Logic.Log.Add("PrintStatus");
}
}
答案8:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Log.Add("RollDice");
Log.Add("Move");
Log.Add("Combat");
Log.Add("GetCoins");
Log.Add("BuyHealth");
Log.Add("PrintStatus");
}
}
答案9:
using static Game.Logic;
class Kata
{
public static void DoTurn()
{
RollDice();
Move();
Combat();
GetCoins();
BuyHealth();
PrintStatus();
}
}
答案10:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Game.Logic.RollDice();
Game.Logic.Move();
Game.Logic.Combat();
Game.Logic.GetCoins();
Game.Logic.BuyHealth();
Game.Logic.PrintStatus();
}
}
答案11:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Game.Logic.RollDice();
Game.Logic.Move();
Game.Logic.Combat();
Game.Logic.GetCoins();
Game.Logic.BuyHealth();
Game.Logic.PrintStatus();
}
}
答案12:
using static Game.Logic;
public class Kata
{
public static void DoTurn()
{
Game.Logic.RollDice();
Game.Logic.Move();
Game.Logic.Combat();
Game.Logic.GetCoins();
Game.Logic.BuyHealth();
Game.Logic.PrintStatus();
}
}