質問編集履歴
1
説明を追加しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
テトリスを作っていますがうまくうごきません。
|
2
|
+
1x4のブロックただまっすぐおとしていくプログラムです。1つ目一番下の枠まで落ち、2つめは1つ目のブロックの1枠上に俳画され、3つ目が俳画されなくなって動かなくなります。
|
1
3
|
using System;
|
2
4
|
using System.Windows.Forms;
|
3
5
|
using System.Drawing;
|
@@ -63,10 +65,10 @@
|
|
63
65
|
{
|
64
66
|
switch (saikoro)
|
65
67
|
{
|
66
|
-
case 1: im[getout + p6].Image = Image.FromFile("C:\\Users\\
|
68
|
+
case 1: im[getout + p6].Image = Image.FromFile("C:\\Users\\\\Pictures\\TETRIS\\bar.jpg");
|
67
69
|
break;
|
68
70
|
case 2:
|
69
|
-
im[getout + p6].Image = Image.FromFile("C:\\Users\\
|
71
|
+
im[getout + p6].Image = Image.FromFile("C:\\Users\\\\Pictures\\TETRIS//.bar.jpg");
|
70
72
|
break;
|
71
73
|
default:
|
72
74
|
break;
|
@@ -115,9 +117,11 @@
|
|
115
117
|
|
116
118
|
|
117
119
|
this.Invalidate();
|
120
|
+
if (UI <= 15)
|
121
|
+
{
|
118
|
-
|
122
|
+
UI++;
|
123
|
+
|
119
|
-
|
124
|
+
}
|
120
|
-
|
121
125
|
}
|
122
126
|
//MessageBox.Show("eee");
|
123
127
|
public void fm_Paint(Object sender, PaintEventArgs e)
|
@@ -142,7 +146,7 @@
|
|
142
146
|
{
|
143
147
|
GPS[IU][UI - 1] = -1; GPS[IU + 1][UI - 1] = -1; GPS[IU + 2][UI - 1] = -1; GPS[IU + 3][UI - 1] = -1;
|
144
148
|
}
|
145
|
-
if (UI <=
|
149
|
+
if (UI <= 14)
|
146
150
|
{
|
147
151
|
for (p7 = 0; p7 < 10; p7++)
|
148
152
|
{
|
@@ -158,7 +162,7 @@
|
|
158
162
|
}
|
159
163
|
}
|
160
164
|
|
161
|
-
if (WW == 1 || UI >
|
165
|
+
if (WW == 1 || UI >= 16)
|
162
166
|
{
|
163
167
|
getout++;
|
164
168
|
UI = 0;
|
@@ -184,9 +188,9 @@
|
|
184
188
|
{
|
185
189
|
switch (saikoro)
|
186
190
|
{
|
187
|
-
case 1: im[getout + p1].Image = Image.FromFile("C:\\Users\\
|
191
|
+
case 1: im[getout + p1].Image = Image.FromFile("C:\\Users\\\\Pictures\\TETRIS\\bar.jpg");
|
188
192
|
break;
|
189
|
-
case 2: im[getout + p1].Image = Image.FromFile("C:\\Users\\
|
193
|
+
case 2: im[getout + p1].Image = Image.FromFile("C:\\Users\\\\Pictures\\TETRIS\\squre.jpg");
|
190
194
|
break;
|
191
195
|
default:
|
192
196
|
break;
|
@@ -214,7 +218,7 @@
|
|
214
218
|
private Image WK;
|
215
219
|
public WAKU()
|
216
220
|
{
|
217
|
-
WK = Image.FromFile("C:\\Users\\
|
221
|
+
WK = Image.FromFile("C:\\Users\\\\Pictures\\TETRIS\\WAKU.png");
|
218
222
|
|
219
223
|
}
|
220
224
|
public Image GetImage()
|