Challenge: Roll That Die! (Code Golf)

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 24332 Views - Last Post: 09 March 2012 - 03:40 PM

#16 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9366
  • View blog
  • Posts: 35,187
  • Joined: 12-June 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 09:06 AM

Ah... well I was treating those numbered items as I would anything from a BA or PM - as suggestions. Haha..

Okay.. 37 lines again and only one semi dbag move of pulling out the colon for a quick declaration/init on the same line just like the ol' VB6 days.

Spoiler

Was This Post Helpful? 0
  • +
  • -

#17 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 11:17 AM

modi123_1: Doesn't do the required face rotation.
Was This Post Helpful? 0
  • +
  • -

#18 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9366
  • View blog
  • Posts: 35,187
  • Joined: 12-June 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 11:46 AM

You would have to be more specific than that.
Was This Post Helpful? 0
  • +
  • -

#19 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 12:17 PM

Attached Image
See Post 1..
In the example I give for negative pitch, look what happens to face R.
Do the dots on a real die, maintain their orientation? Of course not.

This post has been edited by AdamSpeight2008: 09 March 2012 - 12:21 PM

Was This Post Helpful? 0
  • +
  • -

#20 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9366
  • View blog
  • Posts: 35,187
  • Joined: 12-June 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 12:28 PM

Ah.. fancy. I probably won't have time to fiddle with it.
Was This Post Helpful? 0
  • +
  • -

#21 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 12:46 PM

View Postcfoley, on 08 March 2012 - 03:51 AM, said:

I'm also sure you could use some of your VB magic and reduce my line count even further. My method lst() can probably go, but I couldn't work out how to create a list and call a method on it in one line.

Spoiler

cfoley:- Lot of late-binding going on, can you do it with Option Strict On?

This post has been edited by AdamSpeight2008: 09 March 2012 - 02:10 PM

Was This Post Helpful? 0
  • +
  • -

#22 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Challenge: Roll That Die! (Code Golf)

Posted 09 March 2012 - 03:40 PM

Got mine down to 20 LoC ( of evil )
Spoiler

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2