(Finished!) POLL: Python Coding Competition - Choose the winner!


#21

I think there’s a rounding error and we actually have a tie.
With only 16 votes each vote is worth ~6.25 percent,
so 1% is almost certainly a rounding error.


#22

Yes, we have also noted that. @Hanski is the main judge, I will allow him to decide how to proceed


#23

My suggestion is a new poll between the two, but I am open for other ideas too.


#24

I agree on that


#25

The only practical alternative I could think of is rock-paper-scissors,
with each entrant PM-ing their choice so the choices remain secret.

The only advantage is it’s the least time consuming solution as long as both entrants are currently online.

A poll would work too, but if there’s a time limit then naturally some people are going to miss out on voting.


#26

Do you remember how many registered users there were at that time?


#27

No, but I can probably find out with a bit of digging.


#28

No need. Does not really matter.


#29

Should we vote if we use RPS or a new vote between the two :stuck_out_tongue_winking_eye:


#30

Please set up a solution for this. I need to go pack my skis and other gear


#31

I had a quick look anyway.

I can’t find statistics for the number of registered users (it’s probably there somewhere, I just can’t find it),
but I found the number of unique user visits, which is probably good enough.

For the week the Arduboy poll was open, unique user visits averages at 66 unique visits.
For the two days our Python jam poll has been open, unique user visits averages at 29 unique visits.

So essentially we’ve had half the number of visits and half the number of votes,
so statistically speaking we’re doing as expected.

I think we should have a vote about that. :P


If both @bl_ackrain and @dir3kt are both available now then the rock-paper-scissors solution is an option.

Alternatively the judges could just vote.
(I’d volunteer to be a tiebreaker if there aren’t three judges available, but I have to go and eat something.)


#32

@bl_ackrain and @dir3kt, are you here? Which do you prefer? RPS or a poll?


#33

First person of the tied winners to write rock-paper-scissors for the Pokitto wins! :wink:


#34

I will make a new poll between Jetpack and Legend of Lanea.


#35

I knew I should have tried to make a platformer :stuck_out_tongue:


#36

Ok here it is (sorry @bl_ackrain).

rps.bin (145.2 KB)

# Rock, Paper, Scissors
# By dir3kt
#
# Controls:
# - left/right choose option
# - A validate choice
# - C new game

import upygame as pygame
import umachine as pok

pygame.display.init(True)
pygame.display.set_palette_16bit([
	4195,16678,12717,19017,13092,33382,53801,29580,23545,54245,33972,27973,28185,54611,57003,57210
]);
screen = pygame.display.set_mode()

ROCK = 0
PAPER = 1
SCISSORS = 2

title = True

def draw_text_centered(y, text, color):
     pok.draw_text(55 - len(text) * 3, y, text, color)

while True:

    # Read keys
    eventtype = pygame.event.poll()
    if eventtype != pygame.NOEVENT:
        if eventtype.type == pygame.KEYDOWN:
            
            if title:
                if eventtype.key == pygame.BUT_C:
                    title = False
                    player = 0
                    choice = [0, 0]
                    result = None

            elif result:
                if eventtype.key == pygame.BUT_C:
                    title = True
                
            else:
                if eventtype.key == pygame.K_RIGHT:
                    if choice[player] < 2: choice[player] += 1

                if eventtype.key == pygame.K_LEFT:
                    if choice[player] > 0: choice[player] -= 1

                if eventtype.key == pygame.BUT_A:
                    if player == 0:
                        player = 1
                    else:
                        if choice[0] == choice[1]:
                            result = "DRAW!"
                        elif choice[0] == ROCK and choice[1] == SCISSORS or choice[0] == PAPER and choice[1] == ROCK or choice[0] == SCISSORS and choice[1] == PAPER:
                            result = "PLAYER 1 WIN!"
                        else:
                            result = "PLAYER 2 WIN!"

    if title:
        pok.draw_text(21, 30, "Rock", 0xA)
        pok.draw_text(34, 40, "Paper", 0xC)
        pok.draw_text(44, 50, "Scissors", 0x9)
        
    elif result:
        draw_text_centered(40, result, 0xF)
    
    else:
        draw_text_centered(14, "Player " + str(player + 1), 0xF)
        draw_text_centered(24, "Choose wisely", 0xF)
        
        if choice[player] == ROCK:
            draw_text_centered(50, "~ ROCK ~", 0xA)
        elif choice[player] == PAPER:
            draw_text_centered(50, "~ PAPER ~", 0xC)
        elif choice[player] == SCISSORS:
            draw_text_centered(50, "~ SCISSORS ~", 0x9)

    pygame.display.flip()

#37

#38

We have to hide the poll results again because of a new poll round. If you did not see the results of the first round, the screenshot is here:
image

the rest of the games did not get winner votes.


#39

Wait a minute, if @bl_ackrain liked that post then there was a point you were both here and we could have done the rock-paper-scissors thing.

(Also, it doesn’t count because @Hanski didn’t approve the challenge, but well done for throwing it together so quickly.)


#40

@Pharap actually i liked the three judges idea, but
i’am ok with whatever @Hanski 's decision.