Report as inappropriate.
1.Menambahkan action control pada actor untuk belok.
if (Greenfoot.isKeyDown("left"))
{ turn(-4); }
=> Maka apabila ditekan tombol "kiri", actor akan belok/turn ke kiri(-4).
2. Penggunaan pemanggilan fungsi/method. Ini akan memudahkan dan menambah kerapian dalam program.
Fungsi/method akan diletakkan dibagian bawah atau atas, yang nantinya akan dipanggil pada fungsi utama.
Want to leave a comment? You must first log in.
No votes yet.
No Comments