java 程序輔導

java game Joust

CS 1110/1111 – Spring 2015 – Partner Projects

Partner Project 2: Game Project – Due: Wednesday, April 22, 11:00 AM

Games, in addition to being fun, are also a great way to practice many aspects of programming. This semester we’ll create a game similar to the 1982 classic?. In our version we’ll have the two players be oponents instead of allies: they’ll ride giant birds and try to knock one another off their birds. You can try it either by running??or by importing into Eclipse?. The?a,?s,?k, and?l<标题>?keys control the birds.

You should work with one partner on this assignment. You should pick a partner in the Thursday, 2 April lab. Your partner?

Several Java Probelm 代寫

<标题>Several Java Probelm 代寫

Problem 1. (Dragon Curves) Write a program Dragon that takes an int value N as

<标题>command-line argument and prints the instructions for drawing the dragon curve of

<标题>order N. The instructions are strings of F, L, and R characters, where F means “draw

line while moving 1 unit forward,” L means “turn left,” and R means “turn right.” A

<标题>dragon curve of order 0 is just the character F, and a curve of order N is a curve of order

<标题>N ?1 followed by an L followed by a curve of order N ?1 traversed in reverse order with

<标题>R replaced by L and L replaced by R.

$ java Dragon 0


$ java Dragon 1


<标题>$ java Dragon 2


$ java Dragon 3


Dragon curves of orders 0, 1, 2, and 3 and the corresponding instructions are shown


Problem 2. (Visualizing Dragon Curves) Write a program DragonPlot that reads from

standard input the instructions produced by Dragon (from Problem 1) for drawing a

<标题>dragon curve, generates a drawing of the curve (shown below), and saves it in a file