Author Topic: Codegolf - The Reboot #6  (Read 3310 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Codegolf - The Reboot #6
« on: July 06, 2015, 09:54:24 am »
While taking PSAT practice tests, I invented a sort of game to be played on the answer grid. For those who don't know what the PSAT answer sheet looks like, it's basically a 4 by X grid of bubbles, with each row representing a different problem, and each bubble in the row representing an answer choice. I would pretend that four balls began falling down the top of the grid, and the filled bubbles would block their path and cause them to split. The goal of this contest is to display the columns where balls will exit.

Only one bubble will be filled per row, and no row can be. blank. A ball will continue down a column if there is no bubble in that column, and if there is, it will split and move to the two columns on either side only if there is no wall and no filled bubble above it.

Code: [Select]
( )(*)( )( )
( )( )(*)( )
( )( )(*)( )
(*)( )( )( )
( )(*)( )( )
( )( )( )(*)
( )(*)( )( )
(*)( )( )( )
( )( )(*)( )
( )(*)( )( )

The output for the example "map" above would be `A, D`. The pattern for the falling balls would look something like this:

Code: [Select]
(|)(*)(\)(|)
(|)( )(*)(|)
(\)( )(*)(|)
(*)(\)( )(|)
( )(*)(|)(/)
( )( )(|)(*)
( )(*)(|)( )
(*)( )(^)( )
( )(/)(*)(\)
(|)(*)( )(|)

All entries must be complete, no code snippets allowed. The input will be in the form of `yxyy<newline>yyxy` with `y` representing an empty space, `x` a filled bubble, and <newline> representing a newine. `x` and `y` may be replaced with any character you want. The program may receive input through STDIN or read a file. The program output may be any legible form, eg. `{1,0,0,1}`, `1001`, `AD`, `A, D`, `{true, false, false, true}`. All BASIC and Axe entries will be scored on source size, minus the VAT header, asm (calc or computer) entries will be scored on binary size (minus VAT header if on calc), and computer entries will be scored on source size. If there are any questions, please ask. You can submit your entry by PM'ing it to me here, or on IRC on freenode or efnet.

Scores:

Juju: Ruby, 101 bytes
gudenau: Java, 616 bytes
« Last Edit: July 08, 2015, 09:09:07 am by Ivoah »
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Codegolf - The Reboot #6
« Reply #1 on: July 06, 2015, 07:57:42 pm »
It looks kinda hard, but that should be doable.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Codegolf - The Reboot #6
« Reply #2 on: July 06, 2015, 08:54:44 pm »
It looks kinda hard, but that should be doable.

I think the hardest part will be trying to understand what the requirements actually are, it was pretty hard to phrase, and some people have told me the didn't know what they were supposed to do.
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline c4ooo

  • Project Author
  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Codegolf - The Reboot #6
« Reply #3 on: July 07, 2015, 09:31:42 pm »
So if encountering a bubble the ball should split? I think i can do this!
-German Kuznetsov
The impossible chemical compound.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Codegolf - The Reboot #6
« Reply #4 on: July 07, 2015, 09:33:20 pm »
So if encountering a bubble the ball should split? I think i can do this!

Correct.
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline c4ooo

  • Project Author
  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Codegolf - The Reboot #6
« Reply #5 on: July 07, 2015, 10:22:46 pm »
I feel like the answer to this lies in some insane math equation, one that only @lirtosiast can find ;D
-German Kuznetsov
The impossible chemical compound.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Codegolf - The Reboot #6
« Reply #6 on: July 07, 2015, 10:23:15 pm »
I feel like the answer to this lies in some insane math equation, one that only @lirtosiast can find ;D
None that I know of :P
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Codegolf - The Reboot #6
« Reply #7 on: July 08, 2015, 04:19:53 am »
I did it! Got it down to 116 bytes in Ruby, pretty easy when you think about it.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.