// general response class to handle the bulk of responses from hypnosanta // specific things like raptor weddings, pong, etc, should be handled by special-case code in the main file class Response { String[] words; PImage pic; Response(String s1) { initialize(s1, null, null); } Response(String s1, String s2) { initialize(s1,s2,null); } Response(String s1, String s2, PImage img) { initialize(s1, s2, img); } void initialize(String s1, String s2, PImage img) { if (s1 == null) words = null; else if (s2 == null) { words = new String[1]; words[0] = s1; } else { words = new String[2]; words[0] = s1; words[1] = s2; } if (img == null) { pic = null; } else { pic = img; } } }