質問編集履歴

1

画像を表示しました

2016/07/04 08:57

投稿

yusuke.
yusuke.

スコア66

test CHANGED
File without changes
test CHANGED
@@ -117,3 +117,71 @@
117
117
 
118
118
 
119
119
  ```
120
+
121
+ main.rb
122
+
123
+ ```ruby
124
+
125
+ #!ruby -Ks
126
+
127
+ require "./window.rb"
128
+
129
+ require "./kuizu.rb"
130
+
131
+
132
+
133
+ window = Window.new
134
+
135
+ window.drawBack
136
+
137
+ window.gamestart
138
+
139
+ window.refresh
140
+
141
+ yomikomi
142
+
143
+ mondai
144
+
145
+
146
+
147
+ while true do
148
+
149
+ while event = SDL::Event2.poll do
150
+
151
+ case event
152
+
153
+ when SDL::Event2::Quit
154
+
155
+ exit
156
+
157
+ when SDL::Event2::MouseButtonDown
158
+
159
+ x = event.x
160
+
161
+ y = event.y
162
+
163
+ if window.kuizuclicked?(x,y)
164
+
165
+ gamen
166
+
167
+ window.refresh
168
+
169
+ end
170
+
171
+ if window.zairyoclicked?(x,y)
172
+
173
+ require "./zairyo.rb"
174
+
175
+ end
176
+
177
+ end
178
+
179
+ end
180
+
181
+
182
+
183
+ end
184
+
185
+ ```
186
+
187
+ ![エラー文](b4b5042ee50cd7a2ec80a54994e3a242.png)