- Pretend you're talking to a sentient instance of your class. Pretend each of its methods is a question you're asking it. Do those questions all make sense? ("Mr. Gear, what is your tire size?" probably does not.)
- Describe the class's purpose in one sentence. If that sentence contains an "and" or an "or", it probably has more than one responsibility.
- Classes should call their own attribute reader and writer methods instead of reading and writing instance variables directly. (Controllers might be an acceptable exception to this rule.)
- Are there any complex data structures (2-dimensional arrays, etc.) that should be encapsulated in classes with named accessor methods?
- Are there any methods with more than one responsiblity? If you break them down into smaller methods, the new methods may be self-documenting (through their names) and may reveal additional beneficial refactorings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Abstractile.saver | |
Apollonian.saver | |
Atlantis.saver | |
Attraction.saver | |
Boing.saver | |
BouncingCow.saver | |
Boxed.saver | |
Bumps.saver | |
Cage.saver | |
Circuit.saver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Mayor", | |
"playerName": "Jay", | |
"townName": "Littlewood", | |
"mapString": "00000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000010000100000000000000000000000000000000000000000000000000000000000000000000100001000000000000000000000000000000000000000000000000000000000000000000001100011000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000010000100000000000000000000000000000000000000000000000000000000000000000000100001100000000000000000000000000000000000000000000000000000000000000000001000010000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"title":"Mayor","playerName":"Jay","townName":"Littlewood","mapString":"000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000100001000000000000000000000000000000000000000000000000000000000000000000001000010000000000000000000000000000000000000000000000000000000000000000000011000110000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000100001000000000000000000000000000000000000000000000000000000000000000000001000011000000000000000000000000000000000000000000000000000000000000000000010000100000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://processing.org/learning/topics/tree.html | |
# by Joe Holt | |
color_mode RGB, 1 | |
smooth | |
@x = 0.0 | |
@dx = width / 100 | |
def draw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sketch by Jan Vantomme | |
# Part of a series of articles on Processing 2. | |
# Blog post here: | |
# http://vormplus.be/blog/article/drawing-shapes-with-quadratic-vertices | |
# translated for ruby-processing by Martin Prout | |
# translated for Visor by Jay McGavren | |
attr_reader :debug, :step_angle, :cr, :detail | |
@debug = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ported from http://nodebox.net/code/index.php/Graphics_State | |
# This sketch demonstrates how to use the frame rate as orbital state, | |
# as well as how to use system fonts in Ruby-Processing. | |
attr_reader :d_font | |
smooth | |
@d_font = create_font('Helvetica', 40, false, ('a'..'z').to_a) | |
# Note: Colors inverted from original to ease layer blending. | |
stroke 255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This one has a long lineage: | |
# It was originally adapted to Shoes in Ruby, | |
# from a Python example for Nodebox, and then, now | |
# to Ruby-Processing. | |
# -- omygawshkenas | |
attr_reader :alpha, :back_color, :bluish, :hide, :magnitude, :panel | |
attr_reader :x_wiggle, :y_wiggle | |
@hide = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ghc < Formula | |
desc "Glorious Glasgow Haskell Compilation System" | |
homepage "https://haskell.org/ghc/" | |
url "https://downloads.haskell.org/~ghc/8.6.4/ghc-8.6.4-x86_64-apple-darwin.tar.xz" | |
sha256 "cccb58f142fe41b601d73690809f6089f7715b6a50a09aa3d0104176ab4db09e" | |
def install | |
system "./configure", "--prefix=#{prefix}" | |
ENV.deparallelize { system "make", "install" } |