###前提・実現したいこと
javaのCUIでテトリスを作ろうとしています
テトリスといってもCUIなのでゲーム設計は簡単にしています
大体は出来上がってきたのですが、「テトリミノを回転させる」
プログラムがどうしても書けません
どういう動きをすればいいのか全く思いつきません
プログラムとしては
「wを押すとテトリミノを左に90度回転させる」プログラムです
もしよかったら回転させるプログラムを書いてもらいたいです><
ちなみにテトリミノは2次元配列で「”■”」または「”●”」表現しています
本当に困っています>< みなさんの力を貸してください!
###該当のソースコード
Java```ここに言語を入力
ここにご自身が実行したソースコードを書いてください
System.out.println(" T E T R I S"); String [][] field = {{"□","□","□","□","■","□","□","□","□","□"}, //ゲーム画面 {"□","□","□","□","■","□","□","□","□","□"}, {"□","□","□","□","■","□","□","□","□","□"}, {"□","□","□","□","■","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}, {"□","□","□","□","□","□","□","□","□","□"}};
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/01/29 12:58