Theme editor

  • RequestStream Movies, TV shows and anime streaming • 1 week trial
  • LewdCorner Update
    For now, mime and apollo have full control over LC and will be handling site decisions going forward. I’m stepping back from making site changes for now and letting them decide how to move LC forward. - Jack Of Blades
    Read More

Anti-Social & Lurker - Hideout spot

  • Thread starter Thread starter Axois
  • Start date Start date
  • Replies Replies 172K
  • Views Views 5M
In that case I will give you the name of my boss so you can slap him with a hammer
You must be registered to see attachments
Your wish is my command!
You must be registered to see attachments
 

Attachments

You must be registered for see attachments list
Your wish is my command!
You must be registered to see attachments
is my wish your command too? cause then my command is prepare holes to be fucked! if not then @kurgan command him to willingly be fucked by me
 
Tigger Tigger Wave GIF
Winni Tigger GIF


Good morning afternoon evening everyone!

Is there anyone here who hasn't successfully survived monday?

Off the back of this, I just asked: "Using Python, could you code me a very simple version of Blackjack?"

It replied:
Sure, I can help you create a simple version of Blackjack using Python. Below is a basic implementation of the game.

Python:
import random

# Define card values and suits
card_values = {
    '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '10': 10,
    'J': 10, 'Q': 10, 'K': 10, 'A': 11
}
suits = ['Hearts', 'Diamonds', 'Clubs', 'Spades']

# Function to create a deck of cards
def create_deck():
    deck = []
    for suit in suits:
        for card in card_values:
            deck.append((card, suit))
    random.shuffle(deck)
    return deck

# Function to calculate hand value
def calculate_hand_value(hand):
    value = sum(card_values[card] for card, suit in hand)
    aces = sum(1 for card, suit in hand if card == 'A')
    while value > 21 and aces:
        value -= 10
        aces -= 1
    return value

# Function to display hand
def display_hand(hand, player):
    print(f"{player}'s hand: ", end='')
    for card, suit in hand:
        print(f"{card} of {suit}", end=', ')
    print(f"Value: {calculate_hand_value(hand)}")

# Function to play a single round of blackjack
def play_round(deck, chips):
    # Initial hands
    player_hand = [deck.pop(), deck.pop()]
    dealer_hand = [deck.pop(), deck.pop()]
   
    # Player's turn
    while True:
        display_hand(player_hand, 'Player')
        if calculate_hand_value(player_hand) > 21:
            print("Player busts! Dealer wins.")
            return chips - 10  # Lose 10 chips
        move = input("Do you want to (h)it or (s)tand? ").lower()
        if move == 'h':
            player_hand.append(deck.pop())
        elif move == 's':
            break
        else:
            print("Invalid move. Please enter 'h' or 's'.")
   
    # Dealer's turn
    while calculate_hand_value(dealer_hand) < 17:
        dealer_hand.append(deck.pop())
   
    display_hand(dealer_hand, 'Dealer')
   
    # Determine the winner
    player_value = calculate_hand_value(player_hand)
    dealer_value = calculate_hand_value(dealer_hand)
   
    if dealer_value > 21 or player_value > dealer_value:
        print("Player wins!")
        return chips + 20  # Win 20 chips
    elif player_value < dealer_value:
        print("Dealer wins!")
        return chips - 10  # Lose 10 chips
    else:
        print("It's a tie!")
        return chips

# Main game function
def play_blackjack():
    chips = 100  # Starting chips
    while chips > 0:
        print(f"\nYou have {chips} chips.")
        deck = create_deck()
        chips = play_round(deck, chips)
        if chips <= 0:
            print("You've run out of chips. Game over!")
            break
        play_again = input("Do you want to play another round? (y/n): ").lower()
        if play_again != 'y':
            break
    print(f"You finished the game with {chips} chips.")

# Start the game
play_blackjack()

This code provides a basic command-line version of Blackjack. It includes:

  • Creating a deck of cards and shuffling it.
  • Handling the player's and dealer's hands.
  • Allowing the player to hit or stand.
  • Calculating the value of hands, considering the Ace's dual values.
  • Determining the winner based on the hand values.
To play the game, just run the script. The game will prompt you to either hit or stand during your turn and will automatically handle the dealer's turn according to the standard Blackjack rules.

It generated that in 2 seconds. It's taken me longer to copy and paste it and format it into this post.

Can play it here if people are interested:

@kuraiken - you might find this interesting, given our recent chats!

It is interesting, though I've tried something similar on a javascript AI and immediately realized a whole lot of implementation problems.
It works well as a piece limited, but in the greater whole, the AI chooses implementation versions that do not really work.
For instance, I had it generate a 3x3 gameboard with card objects created based on a prototype object that is supposed to have 4 random values from 1-9 and functions to access its neighbors dynamically based on the current position.

JavaScript:
// Prototype object for the card
const cardPrototype = {
  values: Array.from({ length: 4 }, () => Math.floor(Math.random() * 9) + 1),
  top: function() { return gameboard[this.row - 1][this.col]; },
  bottom: function() { return gameboard[this.row + 1][this.col]; },
  left: function() { return gameboard[this.row][this.col - 1]; },
  right: function() { return gameboard[this.row][this.col + 1]; }
};

// Create a 3x3 gameboard with card objects
const gameboard = Array.from({ length: 3 }, () =>
  Array.from({ length: 3 }, () => Object.create(cardPrototype))
);

// Assign row and column properties to each card
gameboard.forEach((row, i) => {
  row.forEach((card, j) => {
    card.row = i;
    card.col = j;
  });
});

While this isn't wrong, that's not really dynamic. It works if you make sure that you tell the card it's new position every time you change on what tile it is,
but it cannot dynamically detect the neighbors.
A dynamic solution would be to use a function to access the gameboard, find the current row & column indexes and then use those to calculate the neighbors. This also only works on a fixed gameboard size with fixed dimensions, since the gameboard is automatically divided into rows and columns.
This also fixes how the gameboard's tiles are accessible, because it predefines the size of the gameboard during creation.

Instead, a different and more flexible solution would've been to have the gameboard creates as containing an array of x tiles, giving the gameboard a width & height and rather than using direct +/- operations on fixed tiles, using modulo to dynamically access the correct neighbors even if the size & width change.

So it's a correct solution that might not work in the actual project, due to restrictions in what choices it has made for the implementation.

I think it's a nifty thing for simple and straightforward operations, but I don't think it can, in the solution, correctly account of implentation-based restrictions in how it's going to have to interact in the greater whole. The particular choice made by the AI does provide the fastest solution (predefined values, even less math) but it's not necessarily giving the solution that would actually work with the project.

I wonder if anyone managed to get it to work with something like PixiJS and create a simple visual game - because I wonder if the AI would detect the necessary restrictions in rendering hierarchy. :unsure:
 
is my wish your command too? cause then my command is prepare holes to be fucked! if not then @kurgan command him to willingly be fucked by me
@kurgan, sorry buddy but...
You must be registered to see attachments


Consider it payment.
 

Attachments

You must be registered for see attachments list

Attachments

You must be registered for see attachments list

Attachments

You must be registered for see attachments list
Tigger Tigger Wave GIF
Winni Tigger GIF


Good morning afternoon evening everyone!

Is there anyone here who hasn't successfully survived monday?
I don't think they can answer if they didn't survive Monday
You must be registered to see attachments
 

Attachments

You must be registered for see attachments list
me fucking you of course!

You must be registered to see attachments
You must be registered to see attachments
Yeah.. so.. *reads it* That's not a permit, Conzi..

 

Attachments

You must be registered for see attachments list

Attachments

You must be registered for see attachments list
HI how is everyone doing this evening
All is serene and the weather is fair,
Tis on eve's like this I have no care,
Woes and sorrows have all been laid bare,
And I'm not even bothered that I'm losing my hair!
 
c'mon 600!
You must be registered to see attachments

We can all see the page number.

You must be registered to see attachments


There's no need to mention it. It's basically a worthless post.



Next time just



I recommend you reply to someone. It's an easier post and will have more reason to exist.

Edit: @Guz89 is too fast and deleted your post before I could!
 

Attachments

You must be registered for see attachments list
You must be registered to see attachments
You must be registered to see attachments


So, how many holes has my favorite Swede plugged today?? ❤️
 

Attachments

You must be registered for see attachments list
OK, @Underlord and everyone else. I needed an upgrade.

You must be registered to see attachments
Oh i see
https://i.imgflip.com/8zci2e.gif

Tigger Tigger Wave GIF
Winni Tigger GIF


Good morning afternoon evening everyone!

Is there anyone here who hasn't successfully survived monday?



It is interesting, though I've tried something similar on a javascript AI and immediately realized a whole lot of implementation problems.
It works well as a piece limited, but in the greater whole, the AI chooses implementation versions that do not really work.
For instance, I had it generate a 3x3 gameboard with card objects created based on a prototype object that is supposed to have 4 random values from 1-9 and functions to access its neighbors dynamically based on the current position.

JavaScript:
// Prototype object for the card
const cardPrototype = {
  values: Array.from({ length: 4 }, () => Math.floor(Math.random() * 9) + 1),
  top: function() { return gameboard[this.row - 1][this.col]; },
  bottom: function() { return gameboard[this.row + 1][this.col]; },
  left: function() { return gameboard[this.row][this.col - 1]; },
  right: function() { return gameboard[this.row][this.col + 1]; }
};

// Create a 3x3 gameboard with card objects
const gameboard = Array.from({ length: 3 }, () =>
  Array.from({ length: 3 }, () => Object.create(cardPrototype))
);

// Assign row and column properties to each card
gameboard.forEach((row, i) => {
  row.forEach((card, j) => {
    card.row = i;
    card.col = j;
  });
});

While this isn't wrong, that's not really dynamic. It works if you make sure that you tell the card it's new position every time you change on what tile it is,
but it cannot dynamically detect the neighbors.
A dynamic solution would be to use a function to access the gameboard, find the current row & column indexes and then use those to calculate the neighbors. This also only works on a fixed gameboard size with fixed dimensions, since the gameboard is automatically divided into rows and columns.
This also fixes how the gameboard's tiles are accessible, because it predefines the size of the gameboard during creation.

Instead, a different and more flexible solution would've been to have the gameboard creates as containing an array of x tiles, giving the gameboard a width & height and rather than using direct +/- operations on fixed tiles, using modulo to dynamically access the correct neighbors even if the size & width change.

So it's a correct solution that might not work in the actual project, due to restrictions in what choices it has made for the implementation.

I think it's a nifty thing for simple and straightforward operations, but I don't think it can, in the solution, correctly account of implentation-based restrictions in how it's going to have to interact in the greater whole. The particular choice made by the AI does provide the fastest solution (predefined values, even less math) but it's not necessarily giving the solution that would actually work with the project.

I wonder if anyone managed to get it to work with something like PixiJS and create a simple visual game - because I wonder if the AI would detect the necessary restrictions in rendering hierarchy. :unsure:
HI how is everyone doing this evening
Hey Dover, hey Kuraiken... doing good!
Glad to have you here
You must be registered to see attachments
 

Attachments

You must be registered for see attachments list
You must be registered to see attachments

We can all see the page number.

You must be registered to see attachments


There's no need to mention it. It's basically a worthless post.



Next time just



I recommend you reply to someone. It's an easier post and will have more reason to exist.

Edit: @Guz89 is too fast and deleted your post before I could!
Uh, hey.. just curious.. what's the page count? *calculates it*

 

Attachments

You must be registered for see attachments list
I don't think they can answer if they didn't survive Monday
You must be registered to see attachments

Smg4 Smg4skill Issue GIF
Pepe Skill Issue Sticker


The least people who die on a monday can do is tell other people about it.
They should polish up on their ghostly skills.

Boo Ghost GIF
 
You must be registered to see attachments


So, how many holes has my favorite Swede plugged today?? ❤️
You must be registered to see attachments
more than one? how is LC's favorite doc holding up?
 

Attachments

You must be registered for see attachments list
You must be registered to see attachments
You must be registered to see attachments
more than one? how is LC's favorite doc holding up?
I think I'm holding up well? Others might have a difference of opinion though.. like telling me..

 

Attachments

You must be registered for see attachments list
I think I'm holding up well? Others might have a difference of opinion though.. like telling me..

You must be registered to see attachments
i found it keeps things interesting! so it is all good.
You must be registered to see attachments
 

Attachments

You must be registered for see attachments list
Back
Top Bottom