A simple Game of Life implementation in Java
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Render.java 561 B

1234567891011121314151617181920212223242526272829303132333435
  1. import java.awt.Color;
  2. public class Render {
  3. public Render (int width, int height) {
  4. }
  5. public Render () {
  6. this(100,100);
  7. }
  8. /**
  9. * Render a color to a position
  10. *
  11. * This should draw to a buffer, which should be
  12. * rendered with render()
  13. *
  14. * @arg x The x coordinate
  15. * @arg y The y coordinate
  16. * @arg c The color to draw
  17. */
  18. public void draw (int x, int y, Color c) {
  19. }
  20. /**
  21. * Renders the stored buffer to the screen.
  22. */
  23. public void render () {
  24. }
  25. }