elevenkbc / java_292_homework

This is my homework program with NTU cource https://train.csie.ntu.edu.tw/train/course.php?id=2321
3 stars 4 forks source link

不好意思打扰了 #1

Open DonnaZY opened 4 years ago

DonnaZY commented 4 years ago

我尝试run了一下你写的贪吃蛇不过只有map一直在loop一直出现很多个map请问是不是我设定的问题呢?

elevenkbc commented 4 years ago

只有MAP的意思是,沒有貪吃蛇,只有背景?? 請問您有螢幕截圖嗎?

DonnaZY notifications@github.com 於 2020年7月2日 週四 下午11:21寫道:

我尝试run了一下你写的贪吃蛇不过只有map一直在loop一直出现很多个map请问是不是我设定的问题呢?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/elevenkbc/java_292_homework/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBWFBTOVTCF4LEDZNGIBX3RZSQZNANCNFSM4OO7ZYJA .

DonnaZY commented 4 years ago

Screenshot (48) 对,一直出背景

DonnaZY commented 4 years ago

试了Tetris也是同样的问题。 不过时候不早了,你可以不用现在回复呢,记得早点休息哦!

elevenkbc commented 4 years ago

哈~ 沒關係的

你要用command line 來執行java

不要透過IDE來執行,可能是因為我裡面用到的清除command line 的指令,在你這個IDE之下沒用

導致畫出來的圖片,都沒有清掉,一直往下畫~~

可以參考這個影片

https://www.youtube.com/watch?v=xHfpO2XOVMI

DonnaZY notifications@github.com 於 2020年7月3日 週五 上午12:38寫道:

试了Tetris也是同样的问题。 不过时候不早了,你可以不用现在回复呢,记得早点休息哦!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elevenkbc/java_292_homework/issues/1#issuecomment-653111244, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBWFBX2ZPJPGFXSSOKJQETRZSZYZANCNFSM4OO7ZYJA .

elevenkbc commented 4 years ago

順帶一提

你run 我的 SnakeGame_nowall class 之後

會產生一個 java 的 GUI 小視窗,事實上那個視窗是用來聆聽鍵盤事件的

所以程式跑起來之後,還要用你的滑鼠 點一下那個小視窗,這樣子你才能用鍵盤來操縱 command line 上面的貪吃蛇

龔柏丞 elevenkbc@gmail.com 於 2020年7月3日 週五 上午9:54寫道:

哈~ 沒關係的

你要用command line 來執行java

不要透過IDE來執行,可能是因為我裡面用到的清除command line 的指令,在你這個IDE之下沒用

導致畫出來的圖片,都沒有清掉,一直往下畫~~

可以參考這個影片

https://www.youtube.com/watch?v=xHfpO2XOVMI

DonnaZY notifications@github.com 於 2020年7月3日 週五 上午12:38寫道:

试了Tetris也是同样的问题。 不过时候不早了,你可以不用现在回复呢,记得早点休息哦!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elevenkbc/java_292_homework/issues/1#issuecomment-653111244, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBWFBX2ZPJPGFXSSOKJQETRZSZYZANCNFSM4OO7ZYJA .

DonnaZY commented 4 years ago

原来如此,因为我第一次打算用code来写游戏,老师要我们用netbeans试看不过我又没有概念,老师才刚交一两课所以想先自学一下~

DonnaZY commented 4 years ago

15937552912133081951458932841180 我尝试用YouTube的那个方法会显示这样

elevenkbc commented 4 years ago

這表示 java 的compiler 並沒有加入到你的系統變數 PATH中,系統並不知道 java 這個命令(找不到 java.exe 這隻程式)

你要找一下你當初JAVA 安裝的位置,然後將那個位置中bin資料夾的路徑複製下來

圖片是,我電腦中的設定,你可能不會跟我一樣,但是你要找到當初裝 JDK 的 bin資料夾 [image: 擷取.PNG]

可以參考這個文章 <https://blog.xuite.net/nicowang999/blog/201724189-Java+JDK+%E5%AE%89%E8%A3%9D%E8%88%87+Path+%E7%92%B0%E5%A2%83%E8%AE%8A%E6%95%B8%E8%A8%AD%E5%AE%9A

設定完成之後,你在command line 輸入 javac 就會有很多提示跑出來

記得java 是編譯語言,所以你要用 javac指令編譯過後,才能用java 指令來執行 .class 的執行檔

以上步驟youtube 影片都有做

DonnaZY notifications@github.com 於 2020年7月3日 週五 下午1:50寫道:

[image: 15937552912133081951458932841180] https://user-images.githubusercontent.com/67750427/86436063-0cdd4c00-bd34-11ea-9708-74ec046a4957.jpg 我尝试用YouTube的那个方法会显示这样

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elevenkbc/java_292_homework/issues/1#issuecomment-653364735, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBWFBUZICCFH6MLSC3K3UTRZVWRZANCNFSM4OO7ZYJA .

elevenkbc commented 4 years ago

我忘記了,原來我影片中並沒有編譯的步驟,可能是我已經先編譯過了

以下影片,是我完整編譯與執行的過程,你可以參考一下

https://youtu.be/RNb_osWSZ1w

龔柏丞 elevenkbc@gmail.com 於 2020年7月3日 週五 下午2:16寫道:

這表示 java 的compiler 並沒有加入到你的系統變數 PATH中,系統並不知道 java 這個命令(找不到 java.exe 這隻程式)

你要找一下你當初JAVA 安裝的位置,然後將那個位置中bin資料夾的路徑複製下來

圖片是,我電腦中的設定,你可能不會跟我一樣,但是你要找到當初裝 JDK 的 bin資料夾 [image: 擷取.PNG]

可以參考這個文章 https://blog.xuite.net/nicowang999/blog/201724189-Java+JDK+%E5%AE%89%E8%A3%9D%E8%88%87+Path+%E7%92%B0%E5%A2%83%E8%AE%8A%E6%95%B8%E8%A8%AD%E5%AE%9A

設定完成之後,你在command line 輸入 javac 就會有很多提示跑出來

記得java 是編譯語言,所以你要用 javac指令編譯過後,才能用java 指令來執行 .class 的執行檔

以上步驟youtube 影片都有做

DonnaZY notifications@github.com 於 2020年7月3日 週五 下午1:50寫道:

[image: 15937552912133081951458932841180] https://user-images.githubusercontent.com/67750427/86436063-0cdd4c00-bd34-11ea-9708-74ec046a4957.jpg 我尝试用YouTube的那个方法会显示这样

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elevenkbc/java_292_homework/issues/1#issuecomment-653364735, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBWFBUZICCFH6MLSC3K3UTRZVWRZANCNFSM4OO7ZYJA .