Dancing Kirby via PowerShell

Dancing Kirby’s are always awesome.  This one was orginaly created by the PowerShell Guy.

Here is a link his github to grab his source code.

https://github.com/MrPowerScripts/PowerScripts/blob/master/Fun/PowershellPet.ps1

 

He also did a video walk through you can watch here or at youtube.

[youtube:http://www.youtube.com/watch?feature=player_detailpage&v=KTOJdj4v4KE%5D

 

Here are a few minor changes I made his script.  I only added two extra dance moves, added new line statements ( ‘n ) and change the syntax on how the move counter is incremented or decremented.


#Powershell Pet

$Move = 10

for (;;) {

  $Mover = ""

  switch (Get-Random 5) {

    0 {break}
    1 {$Move += 1; break}
    2 {$Move -= 1; break}
    3 {$Move += 2; break}
    4 {$Move -= 2; break}
  }

  for ($i=0; $i -lt $Move; $i++) { $Mover += " " }

  cls

  switch (Get-Random 8) {

    0 {
      write-host "`n $Mover(>'')> `n"
      break}

    1 {
      write-host "`n $Mover<(''<) `n"
      break}

   2 {
     write-host "`n $Mover(V''V) `n"
     break}

   3 {
     write-host "`n $Mover(^''^) `n"
     break}

   4 {
     write-host "`n $Mover<( Y ) `n"
     break}

  5 {
    write-host "`n $Mover( Y )> `n"
    break}
 
  6 {
    write-host "`n $Mover<(''<)   (>'')> `n"
    break}
 
  7 {
   write-host "`n $Mover(>'')>   <(''<) `n"
   break}
  }

sleep 1
}
Advertisements

One response to “Dancing Kirby via PowerShell

  1. Hey thanks for adding your touches to this. I really need to make use of the += -= more often. I think this is a good example of why. It looks much better. I like the new animations as well, classic!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s