Posts Feed

  • Ruby Chess

    Chess Game
    Chess Game

    I created a chess game as part of the Odin Project.

    At the moment it is played through the terminal using:

    ruby .\ruby\chess.rb
    

    It is entirely text based, the chess pieces are emojis (♚) and the cells are spaces with the background set to either white or black (if you preview moves you will get a lot more colours).

    The AI uses the min-max algorithm, based upon the one in the tic-tac-toe game I made, but a bit more complicated. If the algorithm breaks due to too many potential moves, then it will pick a move at random.

    The Chess class contains the code for the UI (apart from the extensions to the string class for changing the background), the AI and interactions.

    The Chess Piece class contains the code for testing for Check/Check Mate and extendable methods for checking moves (each piece extends this class with its own particular logic).

    Check Mate

    The AI is not exactly smart, it can only see 3 moves ahead and takes its time to think about each move.

    In Chess Spec I have various tests, mostly for move checking.

    At some point I intend to add this to the website.


  • React Terminal

    React Terminal
    React Terminal

    We do this not because it is easy, but because we thought it would be easy - Some guy on Reddit

    I was inspired by this post about how to create an interactive terminal based portfolio. But they used jQuery Terminal Library, after tearing out all of the jQuery from my site the last thing I wanted to do was to put more of it in. First I had a look at Terminal-in-React, looked ok to me, but NPM complained about the number of vulnerabilities in it. So I thought to myself, how hard could it be? Spoiler, quite hard.

    I decided that the only library that I would use was React. Looking at the article above I used figlet playground to create the ASCII art.

    After that it was figuring out how to do the text entry. I had a brief look at how the jQuery Terminal Library does it (I did not look at the code as that would be cheating! But just watched it though Chrome Dev Tools, it looks like it uses a Text Area and as you type it puts each character into a span). “Why bother doing that?” I thought to myself, I’ll just use a single element such as the humble Input element (another spoiler, that’s why jQuery Terminal Library can do syntax highlighting on the fly and my one cannot). Now which element type should I use to get the input? Inputs do not seem to have the ability to stretch vertically (they do, but the text they contain does not) and I decided that the Text Area was not quite what I wanted. CSS Tricks had the idea of using a Content Editable Span, I had recently played with that at work and giving it a Tab Index of 0 and auto focusing on it seemed to do the trick (my apologies for using a screen reader on that, I am pretty sure that it is terrible especially as it does not leave the element on tab (the element vanishes on the Joke command so it is not totally terrible)).

    Pressing the Enter key sends what you have input to one function which looks at the list of commands (“cd”, “clear”, “credits”, “echo”, “help”, “joke” and “ls”) and the first word entered. It also prevents the default of adding in break elements (which React really hated!). After that it then tries to follow the rules for that command, which is a cross between the logic of the Linux Terminal and what I observed in the jQuery Terminal Library.

    I decided to cut my teeth on the Clear function. After all all it does is clear the array TerminalOutput and I had not even coded a way to display it or to add anything to it! Something which I discovered very quickly with a content editable span in React is that it can enter its content into a React State hook, but this:

    const [terminalText, setTerminalText] = useState<string | null>('');
    <span
      role="textbox"
      aria-label="Console text input"
      id="terminal"
      className={styles.terminal}
      contentEditable
      onInput={(e) => setTerminalText(e.currentTarget.textContent)}
      onKeyDown={(e) => {
        if (e.key == 'Enter') {
          runCommands();
          e.preventDefault();
        }
      }}
      tabIndex={0}
      autoFocus={true}
      ref={(e) => setTerminalSpanRef(e)}
    >
      {terminalText}
    </span>;
    

    Was not something that really worked, as every time you typed a character the cursor was set to the beginning of the span (and React told me off in the console). So instead I used a ref to the element and then simply set the Text Content to an empty string.

    When I looked at my next command “Help”, this was where I also figured out the whole displaying the output idea. This command inserts into the terminalOutput array the Command, Output, the directory the user is in at the moment and any colour to apply to the output (this does use some magic numbers). Then it was simply a case of Mapping through it and putting in the nested spans for the username and directory (the TerminalPath component), then the Pre tag with the output (as Pre respects whitespace). I’ve removed the syntax highlighting from this to make it a bit more readable:

    {
      terminalOutput.map((priorCmd, j) => {
        return (
          <div key={j}>
            <TerminalPath
              path={priorCmd[TerminalHistoryKeys.Directory]}
            ></TerminalPath>
            <span className={styles.greyText}>
              {priorCmd[TerminalHistoryKeys.Command]}
            </span>
            <pre
              className={`${priorCmd.length >= 4 ? priorCmd[TerminalHistoryKeys.Colour] : ''} ${styles.outputText}`}
            >
              {priorCmd[TerminalHistoryKeys.Output]}
            </pre>
          </div>
        );
      });
    }
    

    The help output was more inspired by looking at the setup in Terminal-in-React rather than the list you get in the jQuery version.

    LS and CD were where I went next. At the moment the structure is inspired by the example from the article. It currently only supports top level folders with text in the inner folders, but in theory it could be extended to support more levels (I just have not thought of anything better to put in there!). Using ~ or ~/ as the second arguments you can see the top level directory (.. will work in the next levels). This was fun getting to work with tab completion! It uses RegEx to find the closest, if any, match to the directories. For LS it will print out the relevant structure and CD will update the path variable, if it is given a wrong section argument it will print out an error message.

    The Terminal Path is simply passed as the path prop:

    export default function TerminalPath(props: TerminalPathProps) {
      return (
        <span className={styles.terminalLabel}>
          guest@link477.com<span className={styles.greyText}>:</span>
          <span className={styles.blueText}>{props.path}</span>
          <span className={styles.greyText}>$</span>&nbsp;
        </span>
      );
    }
    

    Echo and Credits were just setting the text content in the output.

    The big one was Joke. Like the article I used the Joke API, a simple fetch call and, as I’m using TypeScript, setting up an interface.

    export interface JokeInterface {
      error: boolean;
      category: string;
      type: 'twopart' | 'single';
      joke: string;
      id: number;
      safe: boolean;
      lang: string;
      flags: { [index: string]: boolean };
      setup: string;
      delivery: string;
    }
    

    Then I had the bright idea of imitating the typing effect like the article did. The article just needed to set the delay and typing options, as they were using the jQuery Terminal Library. As I was not using this I took advantage of useEffect where I could set getJoke to true. This variable switched the editable span to a read-only one and appends a new Pre tag. After Fetch gets the joke it uses setInterval to put one character at once into the Pre tag’s text (using React state and most importantly clearing the state at the end). Once it has finished typing it hands control back to the user and inserts to the terminal history.

    To give some more polish I put in commands for Tab, Up and Down. Tab runs autocompletion where it uses RegEx to search for the nearest command (if it exists). Up and Down scroll through the Terminal History array. Both of these update the Text Content of the Editable Span, which has the effect of moving the cursor to the beginning of the text. Using the following code I was able to set it back to the end:

    const range = document.createRange();
    range.setStart(terminalSpan, 1);
    range.collapse(true);
    
    const sel = window.getSelection();
    sel?.removeAllRanges();
    sel?.addRange(range);
    

    At some point I may add some more features to the terminal and revisit the code to make it a bit less spaghetti like.


  • React

    The remaining React pages now lives here.

    I had my first taste of modular CSS so that I could keep the styles on the different pages apart. A method that I hope to use some more. It was very good to be able to use some proper intellisense for CSS.

    GitHub Pages was unable to run the site as a Browser Router, so it uses the Hash Router instead.


  • VueJS

    Continuing on from my previous post where I moved one of my React Pages, I have now removed VueJS from my main site.

    The VueJS page I made in a tutorial from FreeCodeCamp was never part of the site’s navigation. But it had a folder that sat in the repository and no longer does. I changed what I had made in the tutorial to use the .Vue files rather than be transpiled on the fly. And it no longer uses Axios. It can be viewed here and the repo is here.

    From revisiting that, I can appreciate why React is king! I found VueJS to be a bit unhelpful when it came to error messages (it probably did not help that I also used Vite rather than the Create Vue App). While I appreciate the separation of concerns between the logic and display I prefer reacts way (and not having VSCode complain about everything).

    I had found that my vue_page template had been used a few times on this site. These pages no longer use VueJS and are now regular JS. Some like the Simon Game were easy to take VueJS off. The FCCForum page, that was another story (this one showed the benefits of a JavaScript framework!).


  • Recipe Box Move

    The time finally came when this site got too big and I started moving things.

    The recipe box used to sit within this website’s repository. But now lives on its own repo (since moved to here).

    To enable it to look like it is still a part of this site, I converted my NavBar to a web-component. It has been raw HTML, a React Component and a Jekyll component in its life time. I do like the idea of web-components and will hopefully use more of them (hopefully one less complicated than the NavBar, which is sort of a jekyll component so that the blog section is automatically updated).

    The recipe box is my first Vite react app. As a user of Create-React-App its nice to see NPM Audit bring back no errors. I’m not sure I noticed any differences in performance, but it is only a one-page app (which I’m sure could be done with pure JavaScript like the NavBar).

    Previously the recipe box was a JavaScript class based component (I learnt React from FreeCodeCamp which loved the class based version), before I turned it into a functional component and now it is a TypeScript functional component.


  • Farewell to Railway

    Chart the Stock Market
    Chart the Stock Market

    Recently Railway.app announced a change to their pricing structure, so I took the opportunity to revamp my flask app that ran on there to chart the stock market. It now uses Chart JS instead of MatPlotLib as the most visible difference from before.

    I also moved the front end code’s reference to sockets.io into the node modules, minified the CSS and made a few other amendments which massively boosted the performance of the site (running locally this gets it a score of 97 for performance on lighthouse).

    The site now lives on Render.com, but its URL of stocks.link477.com stays the same.

    Knowledge Graphs

    On a separate note another project I finished was on Knowledge Graphs. This was part of Semantic Web Technologies and Knowledge Graphs, an optional module at City University which I regretted not having chosen, the specifications of the coursework were available on the internet (and I did go to a few of the lectures and heard about it). So once university was over I had a go at it and my repo is here.

    Class Relationships

    The best technology from Knowledge Graphs is SPARQL, it is a lot like SQL but the joins are in the where clause. I do like the fact that you can have the entire database in one file which you can read (unlike any SQL variant I’ve used) and I prefer it over NOSQL, but unless it takes off in popularity I cannot see it overtaking SQL or NOSQL.

    The modules I chose over SWTKG were Computer Vision and Deep Reinforcement Learning.

    Deep Reinforcement Learning

    Deep Reinforcement Learning I would have regretted not taking (though the amount of stress made me regret taking it), it involved making a mini computer game that first a simple bot could try to play and then building various AI agents using Torch that could play a more complicated version of the game implementing various algorithms effectively from the literature (some day I may make a version that is playable by humans).

    The game I also implemented more of less from scratch, using only Numpy and MatPlotLib to store the data about the level and display it. Displaying it was important just for debugging purposes, though it can sort of be played though an IPython notebook as that was how I checked the movement, visibility, animations and collision checking.

    For checking what an earth the AI was doing I was able to dump the generated images from MatPlotLib into an MP4 file. This was rather helpful as there was only so much you could tell from the blow by blow stats from the game.

    I’m not too sure that the AI models I built from scratch were completely correct as the ones from the library were much better (though only once did any model ever win the game).

    Finally we had to build a much more complicated AI, but this time we could use a ready made game (I used Space Invaders). The AI basically sat in one place and shot upwards until it died, which I would say was unsporting.

    Computer Vision

    This one was quite enjoyable, apart from only having about a week to do it as DRL’s coursework had taken over my life. It involved training an AI model to recognise emotions on images, getting a face detector to find faces in the video of our choice (I chose Fantastic Beasts Secrets of Dumbledore’s trailer), send the pictures of those faces to the face detector model in the format required and finally stitch the video back together annotating the faces to show the bounding boxes and the AI’s interpretation of their emotions.


  • Scarlet Sentinels Welcomes New Recruits

    Lieutenant Kieran Cadmus and Librarian Zao Urbane
    Lieutenant Kieran Cadmus and Librarian Zao Urbane with the Outrider squad

    The Scarlet Sentinels Chapter welcomes Lieutenant Kieran Cadmus and Librarian Zao Urbane as its first Primaris Space Marines.

    Chapter Master Alexander Lima and Captain Lucius Vault welcomed them and a squad of Outriders into the Third Company and to the Angel Bastion on Saint Marilyn.

    All five of the new recruits have served the Imperium well in the Unnumbered Sons and are keen to fight alongside their brothers in the chapter.

    Archmagos Dominus Belisarius Cawl sent with them a stock of new geneseed to manufacture more Primaris Marines. With the losses the Chapter took at Baal these recruits are welcome indeed.


  • End of University

    QCP Web App
    QCP Web App

    I am now (hopefully) finished at university. My final epic project has been handed in.

    My project was an internship with QCP, so I cannot go into too much detail, but this is a screenshot of the public test application. But it was to do with recommendation engines and predicting the futures of companies.

    As part of it I had the pleasure of translating a Tensorflow v1 model into PyTorch, scraping thousands of websites, using the MySQL Docker image, creating a Python package and using Node.JS with Python.

    This culminated in a huge report for City University.

    For my other modules I created a computer game for an AI to play in Deep Reinforcement Learning. Analysed the Secrets of Dumbledore trailer for characters’ emotions in Computer Vision. Built a Spark cluster in Google Cloud in Big Data. Compared a Neural Network with a Support Vector machine in classifying data in Neural Computing. Predicted the prices of used Ford cars in Machine Learning. Predicted trends in Covid-19 data in Visual Analytics. Analysed US airline data in Introduction to Data Science.

    Through this course I increased my knowledge of Python, rediscovered MATLAB and discovered LaTex. I also looked at the science behind various machine learning models and made a fair few of them myself.


  • Machine Learning and Model Railway Making

    Kato 28-889, mini diorama curve
    Kato 28-889, mini diorama curve

    Above is the Kato 28-889, mini diorama, which I just finished building and am waiting for the wood glue to dry. A surprising use for Machine Learning.

    Kato is a Japanese company which manufactures a lot of nifty model railway products such as this one.

    The Japanese part is where the problem is, as this product is one just for the domestic Japanese market and consequently the instructions are only in Japanese. For the most part the pictures were easy to follow, until I got near the end and needed to understand what to do with the foam and left over pieces.

    Google Lens to the rescue. An app for Android & iOS, it detects text, that text’s language and translates it. Which enabled me to work out how to finish the diorama stand.

    This was significantly easier than trying to look up each of the Japanese words, which for someone with a Latin alphabet on their keyboard could take a while.

    Hopefully at some point this will be a completed diorama.

    Update Finished diorama Finished diorama


  • Different Report Types

    In my time at McMillan William’s/Taylor Rose MW and as a student at City University I have used various different reporting packages.

    The most flexible report type I have used is SQL Server Reporting Services (SSRS). It may not be as modern as Power BI, but is very easy to customise and to create reports which look good both on screen and printed out (though the printed side is interesting to put it mildly). I have used it to create many reports and used it as a way to template some documents.

    Power BI is something that I have had less experience in, it is useful for creating dashboards with lots of reports interacting with each other (something possible to do in SSRS, but not something that it was designed for). It can also take in data from sources other than SQL Server.

    Elite 3E has its own reporting service. You first built Report Objects, which are effectively XML versions of the SQL query. You can also code in various interactions for the report (such as drill-downs) here. The front-end is then made in Reports, which has most of the functionality as SSRS. On the front-end of 3E you can link Presentations (reports which have met their parameter pages) together in dashboards (these do not have the same interlinking as Power BI/Tableau (as far as I’m aware)).

    Tableau, this is something which I used at University, it is amazing for quickly charting out various different exploratory graphs. A related program Tableau Data Prep allows for the preparation of incoming data (which can be done in Power BI too in a less visual way).

    Python, this is far more flexible at making graphs (not as quick as Tableau/Power BI though). MatPlotLib and Seaborne are wonderful libraries for making neat looking graphs and have relatively straightforward interfaces (there are other libraries for interactive graphs).

    R and MATLAB also have good graph packages, my main issue with MATLAB is the need to pay for it (although its graphs are beautiful). R is something of a strange programming language, I appreciate its syntax being similar to C style languages but I’m not so keen on always using functional programming.

    Excel, often where many reports start or end. Definitely the most flexible of all of these, good for prototyping and can interact with SQL and other spreadsheets. With Power Query you can pull in various data, plus you can connect to SQL Server. Also macros can allow you to do things that Excels formulas cannot (though there are not many things the formulae cannot do).


  • Automating Documents with Word

    Word VBA
    Word VBA

    After spending too long dreaming of how I would automate my invoicing solution I finally cracked the main part of creating the document. Here Word VBA came into its own.

    I had mostly been distracted by Python, as I spend most of my time using it at university (and may at some point wrap a Python script around it). But after spending a couple of days at work converting documents that were automated through Thomson Reuters Contract Express (an amazing system for automating Word documents through questionnaires) to work in plain MS Word (so that they could work for users who did not use Contract Express). It finally hit me to use Word VBA for my own issue.

    My first professional bit of programming was using Excel VBA to automate a couple of spreadsheets which we used in Finance. This work then helped to get me into McMillan Williams 3E project, as 3E’s programming language is VB.Net.

    Transitioning back from VB.Net to VBA was a little painful, as many helpful parts of VB.Net are not present and the macro editor in Word (and Excel) is a bit impatient (if you start writing a line and then leave it while it is invalid an error is immediately raised).

    Using a healthy dose of trail and error (plus the Microsoft pages on Word VBA and a slight bit of Googling) I setup various content controls (mostly because they look like ordinary text when they are filled in) to capture data such as the invoice number, number of hours, rate and invoice date. Then I built a function that activated when a content control was exited to run code after that. It first checks the tag of the control changed (the ActiveX ones directly link to an on-change function), then for number of hours it works out the total and updates that field. For the invoice date it adds 30 days and writes back to the due date control (the portion of code shown). To get to linked controls it uses a loop to look through the tags until it finds the correct one, which is not as efficient as I would like but with only a dozen controls it did not make too much sense to focus on it (but if anyone knows a better way I am very interested in it).


  • Kill Team

    Sargent Griff Snipa stared out at the wastes of Orthanc. His squad of Boyz had set up shop at a way station halfway between two of the hive cities on the planet. They had been dispatched to locate a human relic, an Inquisitor’s digital gun. Said inquisitor had taunted Big Boss Head-Rippa with it and his transport had been shot down over the way station after his retreat from the Orks at Hive Veritas.

    In the distance Griff could see Hive Veritas burning as Captain TeefSnatcher’s forces secured it and its factories. Two siege regiments of the Death Corps of Kreig had been stationed on the planet as they awaited onward transit to the Octarus sector, they had enthusiastically thrown themselves at the Orks, alongside the millions of PDF soldiers and other Imperial Guard forces. The Orks had invaded the planet to destroy its factories and stop the transfers of guardsmen to the Imperium’s many warzones (plus so that they could resupply with equipment pillaged from the planet).

    The way station was now in the no man’s land between the Orks and the Imperium. Most of the defenders had fled before the Orks had arrived there, their battered truck sat ready to escape back to the Ork lines. A continuous rumble of artillery droned on, as both sides fired at each other. Imperial Lightning fighters and Ork fighta-bombas duelled in the skies. High above the WaarghRider and the Ork fleet were finishing off the obsolete defence forces and blockading the planet.

    “It’s not here sarge,” Specialist Frank complained. Frank was more at home shooting at enemies rather than searching through the debris of the way station (before the Inquisitor’s shuttle had fallen on it the way station had been bracketed by Ork artillery and so was littered with various piles of junk).

    “Incoming!” Screeched Private Peterson, who had been enjoying a sneaky cigar break (they had discovered a crate of them in the way station and had been getting through them quickly). They looked up to see a Valkyrie drop ship swoop in and dispatch a group of Kreig guardsmen at the other end side of the way station.

    “Boyz, attack!” Yelled Griff and squeezed off a shot from his sniper rifle, hitting the closest Guardsmen. A medic immediately jumped on him and quickly stopped the bleeding.

    “I gives the orders ere,” Lieutenant Larry growled, the giant Ork Nobb then yelled. “Get um,” and pointed vaguely in the humans direction. They quickly started dividing into three groups to go after each junk pile. With the Lieutenant, bomb squid and Private Peterson going left. Specialist Frank leading the centre group and Breacher Boris leading the right hand group. With Griff left at the back to snipe and guide the others.

    A grenade announced that the Kreig troopers had spotted them, the trooper wounded by them having launched it. The Kreig troops were focusing on the Orks’ right flank and the centre.

    “DAKA DAKA DAKA!” Yelled Larry. Griff obeyed and finished off the human with the grenade launcher. Specialist Frank kept the barrier in front of him, sprinted forwards and shot at another human. On the right hand side one of the Orks was killed by a strike from one of the lightning fighters. The other Orks on the right hand team dived into cover.

    In the centre Specialist Frank threw a sticky bomb behind the humans’ barrier, this seemed to only encourage the humans who charged at the Orks, killing another of them. Lieutenant Larry sent the bomb squig off to help in the centre. A flame trooper unleashed his flame thrower at the Orks, hurting a couple of them and detonating the bomb squig.

    Private Peterson, heavily burned, tried to finish off the trooper but was killed himself. Swordsman Steve charged the flame trooper before he could reload. Specialist Frank shot at the medic. The humans’ sniper had climbed onto the roof of the way station and killed Two-Sword.

    Basha Brutus ran towards the building to take care of him. Lieutenant Larry killed one of the only humans on the left flank. In the centre the Orks had all but wiped out the human forces. But on the right flank the Kreig troopers found the Inquisitor’s body and retrieved his digital gun (plus the dataslate the Ordos Xenos had tasked them to retrieve).

    Basha Brutus killed the sniper and threw his stick of dynamite at the human with the Inquisitor’s gear, killing him and injuring the man next to him.

    Griff watched as his fellow Orks consolidated their hold in the centre and left flank. The Orks started moving after the remaining two humans, but it was too late. The Valkyrie, having retreated to a safe distance, swept in and the Captain and his remaining guardsman jumped onboard. The Orks futility shot at it as it retreated to safer territory.

    “Da boss ain’t gonna be happy that his prize got away,” Larry moaned.

    “We could follow them back to where they came from,” Griff suggested. They quickly radioed in and suddenly a flight of fighta-bombas streaked overhead in pursuit of the Valkyrie.

    The Valkyrie landed outside Hive Prime and the Captain handed over the case of the Inquisitor’s possessions to the Inquisition Storm Troopers waiting for them. The Storm Troopers took it with them and boarded their shuttle. It hurried up into the skies, being tracked by Ork eyes the entire time.


  • Blood Bowl 1st Match

    Practice Match
    Practice Match

    It was a clear and pleasant day in the city of Johnstone, banners fluttered in the wind over the Blood Bowl stadium. The boisterous crowds broke the silence, shouting taunts towards the stands. Sir Guy paced concernedly around his box above the stands surrounding the pitch, neither team had appeared yet and the crowds thirsted for blood. The skies above Johnstone cracked as the warp invaded the mortal realm. Ten thousand orcs appeared as if by magic outside the gates, cries of terror from the guards on the walls greeted them, their sergeants appealed for calm as this had been arranged in advance.

    Strange horseless chariots carried many of the Orc Boyz into the city, their goblins and snotlings either trudged alongside or rode on the vehicles out of reach of the larger Orcs. The Orcs brandished strange swords, much more well-made than the common Orc choppa and they held stranger guns, many glowing with an inner light.

    Aircraft hurled overhead, apparently powered by some sort of silent magic and dropped fireworks over the city.

    Captain Jack TeefSnatcher rode on top of his Leman Russ main battle tank, on his custom throne, he was too large to fit through the commander’s hatch. The tank had been taken from the same shrine world where the WaarghRider’s crew had gained their gold pieces. The planet’s many temples stripped of their gold leaf and other treasures before the irreplaceable artifacts had been melted down in the Ark Machanicum that was part of the space hulk.

    His lieutenants had mentioned that they would be arriving by teleport, and that a few of their boyz would be joining their team to watch (they may have been a bit vague on the exact numbers). Aun Sch’way, the Tau ambassador and Chaplain Gregorious of the Scarlet Sentinels Space Marine chapter followed in their respective tanks. The thousands of Orcs behind them knew not to attempt to make off with their allies’ possessions, the concept of having allies had been hard to explain at first but the mysterious ship at the heart of the space hulk had helped to explain this. The brain boyz having had to explain their concept to the Space Marines as well.

    Sir Guy of Johnstone, with his extremely nervous bodyguards, met the huge Orc outside the stadium. A shuttle dropped into the square next to the stadium and delivered most of the team. A huge squiggaloth bearing a large carriage marched into the square, nervous gretchin and smaller Orcs brought it to a halt in the centre of the square, casually knocking down the statue there. When the handlers in the troop carriers behind had disembarked, they opened the carriage. An incredibly nervous looking troll was corralled out in chains and herded through the crowd of Orcs and humans to the team’s entrance to the stadium.

    The Orcs streamed into the stadium, grinning at the humans as they swapped carefully forged (but solid gold) coins for their tickets. A hastily arranged friendly game was organised between Sir Guy’s necromancer team and the Ullanor All Stars, remarkable for Arag the troll attempting to throw a reluctant Belladona down the pitch and dropping the gretchin at his feet.

    Before the Orcs could get into a proper brawl on the pitch the Imperial Nobility team of Christoph arrived. Pushing their way through the gretchins guarding the tanks in the square the Imperials swaggered in.

    Sir Guy almost feinted with relief as he was able to call back the necromancers before the gretchin could get nasty. The gretchin delegated to being present by the pitch won the coin toss and, not understanding what was going on, let the Imperials receive the ball first. After all it sounded like a good excuse for a fight.

    Brian the ogre stood next to the two Imperial bodyguards in the centre of the pitch, the rest of the nobles hovering behind them. Brian’s fist smashed into the surprised face of Hairy Kim, one of the Black Orcs immediately knocking him over. Chaplain Gregorious sniggered as the tough Orcs took quite a beating, Chakotay the substitute gretchin glowered at him. One of the retainer linemen grabbed the ball and got behind a few of his friends.

    Arag, Hairy and Teef Paris got into something of a brawl in the centre of the pitch, the humans thinking a bit more tactically began to get through the line of orcs. As they were not escorting the ball the goblins contented themselves by watching them, the Orcs not involved in fights aimed in the general direction of the ball, remembering what had been drilled into them.

    Belladonna Torres, still a bit woozy from her near flight, was the first casualty. Getting smashed in the face with a tankard of beer. A couple of snotlings and gretchin carried her off the pitch. She was placed in the tender mercies of one of the ship’s doctors.

    In a series of brutal blocks, the Orcs in front of the ball carrier were pushed aside, then the humans were properly inside the Orcs’ side of the pitch and heading for the touchdown zone. Chopa Tuvok woke up and, with the help of the backstop gretchin, beat the ball carrier down. Moldo grabbed the ball, legged it around the humans and ran to Thiefling to pass on the ball. In turn Thiefling legged it into the Noble’s side of the pitch. His success was short-lived, getting knocked out by one of the humans and loosing hold of the ball.

    Emboldened by their success the humans ran straight back into Orcs’s side. One of the humans casually strolled into the touchdown zone, flipping the bird at an indignant Chakotay as he arrived. The Orcs were a bit more awake this time, those not involved in the scrap in the centre headed back towards the ball. The ball-carrier had his pretty face bruised by Seb Slammer and lost the ball. The surrounding goblins all failed to catch it and the indignant human who had stood at the end zone helped escort the ball’s new holder towards the endzone. With millimetres to the end-zone to go the goblins took out the ball carrier, causing gasps from the crowd. As more Orcs arrived the humans mounted a desperate last attempt to take the ball back before half time was called. The goblin in front of the ball was pushed out of the way, the human attempted to grab the ball but fumbled it and dropped it just shy of the line. The bell tolled signalling half-time and the Orcs sighed with relief.

    Aun Sch’way leaned over to TeefSnatcher and, in a stage whisper, said, “I think that the aim of the game is to get the ball to the end of your opponent’s side, not watch your opponents run around with it.”

    “Thank you for that Ambassador,” TeefSnatcher replied, to his earpiece he said. “Stop being so parochial, you’re Orcs get into their side of the pitch and stop laying down on the job.”

    The bell tolled again and the ball dropped into the goblin’s side of the pitch. Chakotay quickly grabbed it, having been released from the substitute section while the other two remained knocked out or injured, while the remaining two advanced forward. Arag went to punch Brian and promptly went down as the Ogre sucker punched him. Groans went up from the Orc crowd and cheers greeted it from the human supporters. The Nobles took advantage of the shock and pushed into the Orcs, taking them by surprise.

    The gretchin advanced behind the Orcs trying to use them for protection as they tried to sneak around the right-hand flank. The Nobles who had snuck behind the Orcs’ left and those to the right began beating up the goblins. The brawl surrounded the unconscious Troll who snoozed forgotten amongst them. Not sure what was going on, the Ogre stood bone-headedly in the scrap. The humans on the left thinking that they were so smart, got their comeuppance as the Orcs in charge of that side woke up to the threat and started attacking them.

    One of the humans managed to grab hold of the ball. A swift kick to the crotch from Moldo swiftly relieved him of it. The ball was fumbled in a conga line by the players, as all were distracted by the fight, the Ogre getting knocked on the head by it and it lay behind him.

    The humans tried to make a break for the ball, but many were twirled around in their fights with the Orcs. Moldo got up and stamped on one of the humans knocking him out. The troll finally managed to stand up, Hairy Kim bashing his way back to him to whisper instructions into his ear and Arag smashed one of the humans, causing such injury that it was announced that he wouldn’t be playing next match. One of the humans grabbed the ball and they started legging it back round into the Orc’s side of the pitch.

    The Orcs this time listened to the instructions in their comm beads and a couple disengaged from the brawl. The humans having passed the ball further into their territory. Backed up by the gretchin, Tuvok pushed the ball carrier off the pitch.

    Chaplain Gregorious sent Brother Remus to boot the ball back onto the pitch, it landed near the scrum at the centre of the pitch.

    Teef Paris concluded the fight he had been having with Gimli on and off since the first kick-off. Moldo, henceforth to be known as Robbie Fouler, gave him a summary kick to the jaw. Gaunt Glower, one of the Black Orcs was carried off by the Snotlings, having been knocked out in the brawl. The Ogre disengaged from the fight to try to protect the ball. However, the Orcs and gretchin were now on something of a roll, with the bigger Black Orcs laying out the humans and then the gretchin stopping them getting back up. Chakotay grabbed the ball and started running for the touchdown zone. He was swiftly tripped by one of the few humans, they ran a desperate defence as they tried to wrestle back control of the ball. But Arag was now awake and listening to Hairy Kim’s instructions and the Black Orcs kept them busy while Chakotay got up and made a final run for the touchdown zone. Neatly placing the ball down just over the line. The final three conscious humans decided that they would rather not donate their teeth to Robbie Fouler, who along with Klepto Janeway had reaped a fearsome tally of the humans downed by the Black Orcs.

    “And that gentlemen is Blood Bowl,” Captain Jack said, flourishing his hat at the enraged Christoph D’Ancy. Sir Guy gave him an incredulous look.

    Blood Bowl Blood Bowl

    On the fields outside Johnstone the Orcs celebrated with the nervous townsfolk. The Tau and Space Marines joining TeefSnatcher and his Lieutenants for a conference of their next steps. As it got dark the warp breached open and in a blinding flash of light the Orcs, Tau and Space Marines vanished into the sky.