Demogo/Game.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Media;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demogo
{/// <summary>
/// 游戏类
/// </summary>
class Game
{
//private const int GameWidth = 710;
//private const int GameHeight = 460;
private Point mapLeft;
private static int unit = 15;
private readonly int length = 25 * unit;
private readonly int width = 25 * unit;
public int score = 0;
private readonly Snake snake;
public Snake Snake
{
get
{
return snake;
}
}
Food food;
private bool eat;
private List<obstacle> obstacles { get; set; }
private Point[] obstaclePoints =
{
//new Point(0,0),
//new Point(0,415),
new Point(0,15),
//new Point(0,30),
new Point(0,45),
//new Point(0,60),
new Point(0,75),
//new Point(0,90),
new Point(0,105),
//new Point(0,120),
new Point(0,135),
//new Point(0,150),
new Point(0,165),
//new Point(0,180),
new Point(0,195),
//new Point(0,210),
new Point(0,225),
//new Point(0,240),
new Point(0,255),
//new Point(0,270),
new Point(0,285),
//new Point(0,300),
new Point(0,315),
后面还有 284 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。