# June 2017 Community Challenge

The May 2017 has just been selected as simulating a chain/belt drive system, so let's get started on picking one for June 2017.

It's time to choose a for June 2017.

• Post your challenge as an answer to this question. Feel free to resubmit non-winning ideas from previous months.
• Vote for those answers which interest you.
• At the end-of-day on Wednesday, May 31st, the top-voted post will become the next challenge.

Once the challenge topic is decided, post your solution as a question on the main site and tag it with . The challenge runs throughout June (but nothing stops you from posting an entry later on).

While last year was all about games, let's keep this year going on the topic of 'industrial systems' and such.

People always want to implement an 'Elevator Management System', and we also saw a 'Traffic Light Simulator', both of these have one very common element: they're generally done in PLC-based systems.

Let's keep that theme going with the next subject:

# Let's simulate an overhead crane!

For those who don't know, an overhead crane is a common piece of equipment found in many manufacturing plants, distribution centers, and so on. It's a device that is usually mounted on two very large rails on opposite sites of the area in which it works.

In the image above, the red beams on the left and right directly below the yellow one are the two rails that make up either the X axis, or the Y axis, depending on the model and installation. From there, the main crane hook can travel along the yellow beam to the left and right to make up the opposite axis. It then has a cable to lower and raise itself, to make up the Z axis.

The goal of this community challenge is to simulate such a device graphically. You require eight input buttons:

1. Left and Right: these should move the crane along one of the X or Y axis, whichever you are using to represent the yellow beam pictured above;
2. Forward and Backward: these should move the crane along the other X or Y axis, whichever you are using to represent the red beams pictured above;
3. Up and Down: these should move the crane hook up and down or along the Z axis;
4. Emergency Stop: this button should disable all input from the crane;
5. Emergency-Stop Reset: this button should 'reset' the emergency stop circuit and allow the crane to move again;

You may simulate the graphics any way you like, whether that be Text or GUI, and your eight input buttons should function as listed.

Bonus points:

• For extra-credit you may add a 'claw' feature on the hook that will open and close it, this should have two input buttons (Open and Close).
• You may also add a 'dead-man-switch', an additional input button that must be held by the user to perform any motion.
• "For extra-credit you may add a 'claw' feature on the hook that will open and close it, this should have two input buttons (Open and Close)." For extra extra credit, make it a claw that needs to be kept 'closed' or it will open again. I've seen plenty of hydraulic systems work like that and they always screw with a traditional step-based approach. – Mast May 12 '17 at 23:44
• It seems like some members in the community have been playing way too much Factorio. – Simon Forsberg May 20 '17 at 16:55

## Chess!

Last year ended with a board-game spree. Let's continue this year with one.

I think you all know the game of Chess, which is exactly why I just linked to the Wikipedia page. Even though everyone knows it, you might not know all the details about it.

What I like about a Chess challenge is that it can be both a small and a large challenge, depending on what you want to do with it. Let's take a look at some possible challenges for Chess: (feel free to pick the ones you want)

• Implement logic to determine where/how pieces can move/attack
• Determine which squares are threatened by what pieces
• Implement support for some Chess notation (there are a bunch to choose from)
• Given a history of chess moves, check if all moves are valid and figure out how the board looks like now.
• Interact with the Lichess API for example use this data and implement the above
• Make a GUI
• Make a Chess computer opponent
• Make a Chess computer opponent that beats Stockfish level 8 (good luck with that)
• Implement some Chess variant such as Atomic Chess
• Probably a bunch of other stuff
• Unfortunately, while I would love to do this, I've got other priorities. Maybe sometime. – Hosch250 May 6 '17 at 23:41
• Fun fact: Every now and then we play Chess at work, this might have inspired this idea :) – Simon Forsberg May 12 '17 at 15:15