<story><title>Show HN: Virtual pet game made for my daughter</title><url>https://bsawyer.github.io/tamagotchi/index.html</url></story><parent_chain></parent_chain><comment><author>RugnirViking</author><text>Personally, I think a little more feedback into what effect each action has would be good. I couldn&amp;#x27;t figure out if the buttons did anything at all except change the animation. Perhaps a status bar showing the hunger&amp;#x2F;thirst&amp;#x2F;boredom going up or whatever.&lt;p&gt;The animations and the aestetic are great though!</text></comment>
<story><title>Show HN: Virtual pet game made for my daughter</title><url>https://bsawyer.github.io/tamagotchi/index.html</url></story><parent_chain></parent_chain><comment><author>nkrisc</author><text>I&amp;#x27;ve never seen this pattern before in JS, in the parameters for the constructor. playing with it in the browser, I can see it lets you define default values for expected arguments when calling it but you can provide other values.&lt;p&gt;What is this called? I&amp;#x27;d like to read more about it.&lt;p&gt;&lt;pre&gt;&lt;code&gt;  class Resource{
    constructor({
      min = 0,
      max = 1,
      count = 0
    }={}){
      this.min = min;
      this.max = max;
      this.count = count;
    }
  }&lt;/code&gt;&lt;/pre&gt;</text></comment>