FrmMain.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Media;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Demogo
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
game = new Game(new Point(50, 50));
BackColor = Color.Silver;
}
private readonly Game game;
private void FrmMain_Load(object sender, EventArgs e)
{
//初始化
Game game = new Game(new Point(50, 50));
}
public void Game_gameChanged()
{
//通知游戏改变
if (game != null)
{
//重绘
panelGame.Invalidate();
}
}
private void FrmMain_KeyDown(object sender, KeyEventArgs e)
{
//传递按键
game.move(e.KeyCode.ToString());
//重绘
this.panelGame.Invalidate();
}
public void timer1_Tick(object sender, EventArgs e)
{
//时钟停止
timer1.Stop();
game.Step();
//重绘
this.panelGame.Invalidate();
//时钟开始
timer1.Start();
//this.timer1.Interval = 300;
后面还有 93 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。