Mechanical keyboards have a huge, fanatical following! /c/mechanical_keyboards - shame it’s dead. I expected to see posts of why the IBM Model M is better than everything else!
I’m really happy that it works for you! Well done on doing the hard work to find it!
Exactly! The old books cover the terminal commands really well and almost everything will still apply. If you read it cover to cover, you’re going to end up knowing more commands than most daily users of Linux and it’d help you with any networking / IT courses you intend to study.
Why not have one class that has a level for each trait, which are scored 0-100, 0-10 etc. so… self.luck = 7.3
self.anger = 4.0
and so on. And then there’s one method that determines the action. That’s going to be so much easier to maintain, extend, and work with.
class CharacterTraits:
def __init__(self, luck, anger, magic, ...):
self.luck = luck
self.anger = anger
# and so on
# maybe keep a list of previous actions which could inform the next action state
self.history = []
def get_action(self):
# do whatever to decide action
action = ...
# then add it to history
self.history.append(action)
return action
and then the calling code determines what’s output to the screen. So, internally, the class is just responsible for one thing - hte business logic. Maybe another class Game
could be responsible for outputting the strings, taking user input etc. If the UI were to change at a later date, the CharacterTraits
class stays the same, but only the Game
class would need to be modified. Instead of - as I understand it - all the classes currently would have to be updated (a maintenance nightmare!)
I only had a really quick look down the code so I may be missing the point entirely, but that’s the direction I would go down.
EDIT: the get_action
method could take in some args, like opponent_traits
or some kind of situation, maybe even add additional methods like is_lucky
to return a bool as to whether a situation that requires luck has been successful or not. Another method could be has_won_fight(opponent_traits)
and the method compares strength, luck, magic whatever, to the opponent to decide whether the character has won. And so on. By keeping it simple like this, it’s a lot easier to work with!
Wow. I updated the post above with some cheapo alternatives that have mechanical keys.
There’s also MIDI controllers like: https://www.aliexpress.com/item/1005007444327683.html maybe more listed under DJ / mixing controllers
Edit: The post asked about how I feel about the size. My opinion is that I wish it had 1 (ideally 2) more vertical sets of keys because that would allow me to use my thumb for button pressing too. But overall I’m happy and I think it’s my only real problem with it.
Check aliexpress. You’re going to find things that excite you including a kb that’s very similar
EDIT: I thought I’d go searching, some ideas:
They currently have the parent class “Action” for their common attributes and methods. Does that cover what you are suggesting?
I didn’t see, but if they want a trait that has a completely set of different methods? I’m not a big fan of interface-esque classes unless the API is absolutely solid. In this case it would not be.
Looks nice. How much did it cost?
Yep, fans are always the same. Keep them clean for a healthy life, and if they’re noisy then it’s the bearing. Giving it a push to get it going is the tell-tale sign.
Useful in winter I suppose!
Is libtorrent actually installed as a package? I see you’re on windows, but surely there’s an so you need to download or such? Haven’t used windows for many years though.
I’ve only glanced down your code and am not familiar with your previous efforts. Combine insulting and stirred-up to one class. “CharacterTraits” or so. This then makes it easier to add more traits like happiness, warmongering, intelligence, luck etc.
Much. passive. angry.
Amateurs. Mate > KDE.
amateur chemistry
So… cooking meth?
Why do you think you got it for free ;)
Using VSC, it’s so painful to code in python. Pycharm is starting to come along nicely.
Psyops: Let’s help the little people get it out of their systems… Let’s get them to stand around with signs just like the good old days and put up a few posts on social media to organise it. They’ll soon give up and learn to accept it.
It sounds beautiful! It’d be really nice if there were transparent rubber keypads available that could be put over phone screens. Then you could fashion an old phone as a keyboard with infinite layers. A simple flutter app to set up the shortcuts and make them configurable and badda boom!