AlaskaLinuxUser's Scratchpad

Commit thy works unto the LORD, and thy thoughts shall be established. - Proverbs 16:3

Merging Two MP4 Files From The Command Line

term

One of the problems I find with video editing, is sometimes it becomes very complicated to do something very simple. Take my current need. I needed to simply tie two mp4 files together, unedited, just hook one to the next. There are lots of gui types, but that requires opening …

Promotion time picoEngine!

picoEnginePawns

It's really important to note that if a pawn gets promoted, it becomes the new piece, whatever that piece is. Either a knight, bishop, rook, or queen. While this was happening in the interface, it was not being recognized by picoEngine. Since picoEngine didn't know it was promoted, it would …

picoEngine?! Where is the king?!

picoengineKingStuck

What good is king safety if the king refuses to capture it's attacker? I guess I had programmed a cowardly lion... er... uh... king. Actually the real problem was that of where the king "was" on the board, per my code.

// For checking if the king is safe.

int z …

Pawns, one step at a time, picoEngine....

picoEnginePawns

Okay, it's time to work on moves for the last piece: the pawn. Believe it or not, the pawn is the most difficult piece for me to program. It has so many small idiosyncrasies. If you are on the home row, you can go two spaces, but not any other …

This is not checkers, picoEngine....

picoEngineKing

Then why does he say "king me?!" Today I worked on the king moves for picoEngine. Note that I did not include castling moves yet. Without the castle moves, the king is actually one of the easiest pieces to program, as you can see:

string Moves::kingMoves(string boardPositions, int …

Bishops aren't Bums...

picoengineBishop

Believe it or not, the bishops can now move! 3 of the 6 piece types now have the complete freedom of movement that they should have on the regular board! Things seem to be making steady progress, although I still see some issues with kingSafety, so I'll have to work …

Uh, picoEngine? I thought you said the king was safe?

kingsafe

Except he's not. That's right. I big technical oversight on my part allowed the king to not be safe at all!

while (boardPositions[k] == '*' && notI) {

Needed to be changed to:

while (boardPositions[k] == '-' && notI) {

That's right! A - is what my board uses for empty spaces. But the Java board I …

picoEngine is such a rook-ie!

picoEngineRook

Now the rooks can move too!

While it is only a small improvement, the rooks can now also be moved by picoEngine, which is a great step forward. Overall, that leaves 2 of 6 pieces complete for motion, or about 33% complete. Technically, when that is done, the engine will …