91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 18.95MB
    文件類型: .7z
    金幣: 2
    下載: 1 次
    發布日期: 2023-06-15
  • 語言: C#
  • 標簽: C#??

資源簡介

里面包括俄羅斯方塊,停車場,貪吃蛇,,,等數十種小游戲,非常值得一看!?。?

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Collections;

namespace?Parking
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?int[]?a;?????????????????//車位之間的通道信息
????????private?int[]?c?=?new?int[7];?????//車位中的車輛顏色代號
????????private?int[]?d?=?new?int[7];?????//車位中的初始時車輛顏色代號
????????private?int?order;????????????????//用戶當前玩的關號
????????private?int?Total?=?3;????????????//總關數
????????ArrayList??trace=new?ArrayList();
????????Point?p1?=?new?Point(68?275);
????????Point?p2?=?new?Point(68?125);
????????Point?p3?=?new?Point(218?35);
????????Point?p4?=?new?Point(368?125);
????????Point?p5?=?new?Point(368?275);
????????Point?p6?=?new?Point(218?355);
????????Point[]?p;

????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????a?=?new?int[7?7];
????????????p?=?new?Point[7]?{?new?Point(0?0)?p1?p2?p3?p4?p5?p6?};
????????????order?=?1;???????????????????//當前是第一關

????????}

????????private?void?pBox_Click(object?sender?EventArgs?e)//事件處理方法
????????{
????????????PictureBox?pBox?=?(PictureBox)sender;
????????????int?j=Convert.ToInt16(pBox.Name.Substring(pBox.Name.Length?-?1?1));
????????????//計算所在車位
????????????int?n=0;
????????????for?(int?i?=?1;?i?<=?6;?i++)
????????????{
????????????????if?(c[i]?==?j)?n?=?i;
????????????}
????????????for?(int?m?=?1;?m?<=?6;?m++)
????????????{
????????????????if?(c[m]?==?0)//找出空車位m
????????????????{
????????????????????if?(a[m?n]?==?1?||?a[n?m]?==?1)//如果車位m?n之間有通道
????????????????????{
????????????????????????pBox.Location?=?p[m];//汽車移到空車位m
????????????????????????c[m]?=?c[n];?c[n]?=?0;
????????????????????}
????????????????????break;?
????????????????}
????????????}
????????????if?(success())
????????????{
????????????????order++;
????????????????//select_order(order);
????????????????MessageBox.Show(“成功了“?“恭喜“);
????????????????this.Text?=?“停車場游戲“;
????????????????this.Invalidate();?
????????????????button1_Click(sender?e);
????????????}
????????}
????????private?void?Draw_Road()//畫出車位之間通道
????????{
????????????Graphics?g?=?this.CreateGraphics();
????????????SolidBrush?b?=?new?SolidBrush(Color.BlanchedAlmond);
????????????for?(int?i?=?1;?i?<=?6;?i++)
????????????????for?(int?j?=?1;?j?<=?6;?j++)
????????????????{
????????????????????if?(a[i?j]?==?1)//第i和j停車位有通道
????????????????????{
????????????????????????g.DrawLine(new?Pen(Color.Blue?14)
????????????????????????????p[i].X?+?40?p[i].Y?+?15?p[j].X?+?40?p[j].Y?+?15);
????????????????????}
????????????????}
????????}
????????private?void?Draw_park()//畫出停車位
????????{
????????????Graphics?g?=?this.CreateGraphics();
????????????SolidBrush?b?=?new?SolidBrush(Color.BlanchedAlmond);
????????????Rectangle?r;
????????????r?=

評論

共有 條評論